CLI.morphology.morph_analyzer¶
About:¶
The morphology_analyzer command is designed to provide morphological analysis for Arabic text using the SinaTools morph_analyzer API. Users can specify the language and desired analysis task (lemmatization, part-of-speech tagging, or full morphological analysis), and flag.
Usage:¶
Below is the usage information that can be generated by running morphology_analyzer --help.
morphology_analyzer --text=TEXT [OPTIONS]
morphology_analyzer --file=FILE [OPTIONS]
Options:¶
--text TEXT
The text that needs to be morphologically analyzed.
--file FILE
File containing the text to be morphologically analyzed
--language LANGUAGE [default=MSA]
Specifies the language for the analysis. In the current version, MSA is only supported.
--task TASK [default=full]
Determines the specific type of morphological analysis to be performed. Available options are:
- lemmatization: the morphological solution includes only the lemma_id, lemma, token, and token frequency.
- pos: the morphological solution includes only the part-of-speech, token, and token frequency.
- root: the morphological solution includes only the root, token, and token frequency.
- full: the morphological solution includes the lemma_id, lemma, part-of-speech, root, token, and token frequency.
The default is full.
--flag FLAG [default=1]
The flag to filter the returned results. If the flag is `1`, the solution with the highest frequency will be returned. If the flag is `*`, all solutions will be returned, ordered descendingly, with the highest frequency solution first. The default flag if not specified is `1`.
Examples:¶
morphology_analyzer --text "Your Arabic text here" --language MSA --task full --flag 1
morphology_analyzer --file "path/to/your/file.txt" --language MSA --task full --flag 1