Interactive Command Line

  • AfroLID interactive cli afrolid_cli support only beam search with the following default setting:

    • -m or --model_path: Rath of the AfroLID model directory, (Required)

    • -o or --max_outputs: The maximum of the output tanslations (default value is 3)

    • -l or --logging_file: Number of beams (default value is 1)

    • -n or --no_repeat_ngram_size: Number of n-gram that doesn’t appears twice (default value is 2)

  • afrolid_cli command asks you you to input your input text. Moreover, you can write q to exsit as shown in the following image.

afrolid_cli

Usage and Arguments

afrolid_cli -h

AfrlioLID Interactive

!afrolid_cli --model_path /path/to/model
2022-12-06 18:01:24 | INFO | afroli.afrolid_cli | AfroLID Command Line Interface
2022-12-06 18:01:24 | INFO | afroli.afrolid_cli | Initalizing AfroLID's task and model.
| [input] dictionary: 64001 types
| [label] dictionary: 528 types
Type your input text or (q) to STOP: ዮሃንስ ኣብ ኢድ እቲ ብርቱዕ መልኣኽ እንታይ ይርኢ ፧ 5 ዮሃንስ
2022-12-06 18:01:41 | INFO | afroli.afrolid_cli | Input text: ዮሃንስ ኣብ ኢድ እቲ ብርቱዕ መልኣኽ እንታይ ይርኢ ፧ 5 ዮሃንስ
Predicted languages:
      |-- ISO: tir  Name: Tigrinya  Script: Ethiopic        Score: 100.0%
Type your input text or (q) to STOP:  ከ ሀ እከ ፖ የኮሜዲያን ቶማስ እና ናቲ ኮሜዲ ድራማ እና 50
2022-12-06 18:01:57 | INFO | afroli.afrolid_cli | Input text:  ከ ሀ እከ ፖ የኮሜዲያን ቶማስ እና ናቲ ኮሜዲ ድራማ እና 50
Predicted languages:
      |-- ISO: amh  Name: Amharic   Script: Ethiopic        Score: 49.74%
      |-- ISO: tir  Name: Tigrinya  Script: Ethiopic        Score: 49.34%
      |-- ISO: gof  Name: Goofa     Script: Latin   Score: 0.82%
Type your input text or (q) to STOP: أوشا يبد ارايس ن ڒفقها ينا-ٱس إ عيسى : ما وار
2022-12-06 18:02:09 | INFO | afroli.afrolid_cli | Input text: أوشا يبد ارايس ن ڒفقها ينا-ٱس إ عيسى : ما وار
Predicted languages:
      |-- ISO: rif  Name: Tarifit   Script: Arabic  Score: 100.0%
Type your input text or (q) to STOP: Vamteta vakulu na vagogo va vandu vamkotili
2022-12-06 18:02:18 | INFO | afroli.afrolid_cli | Input text: Vamteta vakulu na vagogo va vandu vamkotili
Predicted languages:
      |-- ISO: ngo  Name: Ngoni     Script: Latin   Score: 99.95%
      |-- ISO: rwk  Name: Rwa       Script: Latin   Score: 0.01%
      |-- ISO: asa  Name: Asu       Script: Latin   Score: 0.01%
Type your input text or (q) to STOP: q