apertium-python | Apertium API in Python | REST library
kandi X-RAY | apertium-python Summary
kandi X-RAY | apertium-python Summary
Apertium API in Python.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the installation path for windows
- Search rootpath
- Update modes
- Append a pair of paths
- Tag text in_text
- Return a list of the commands that are used in the tagger
- Return a list of lexical units
- Tag in_text
- Analyze text
- Return list of available analyzers
- Parse text into lexical units
- Analyze the text in_text
- Translate text using language
- Get translation commands
- Translate text
- Parse mode file
- Generate text from in_text
- Generate code from text
- Get the list of available commands
- Install apertium module
- Return the installed installer
- Install an apertium module
- Download apertium
- Download zip files
- Searches for the specified find_value
- Initial setup
apertium-python Key Features
apertium-python Examples and Code Snippets
Community Discussions
Trending Discussions on apertium-python
QUESTION
I'm trying to POS-tag some sentences in Italian with Apertium's tagger. While according to the Apertium GitHub page I am supposed to get as output also the surface form in addition to the morphological analysis, I only get the analysis. I want also the surface form. I cannot infer it since the tagger doesn't necessarily tag a single token, so I cannot simply tokenize the original sentence and loop over it or zip it with the tagger's output.
According to the GitHub page:
...ANSWER
Answered 2020-Nov-18 at 21:29By default, when creating a tagger of language ita
it looks for /usr/share/apertium/modes/ita-tagger.mode
. This is a shell script that calls various apertium commands. The command for the Italian tagger script happens to be configured to not include surface commands (it's missing the -p
option).
A quick and dirty solution is to just sudo vim /usr/share/apertium/modes/ita-tagger.mode
(or sudo nano
or whatever your editor is) and add -p
to the end of the last command, so the file looks like
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install apertium-python
Installation on Debian/Ubuntu and Windows is natively supported: pip install apertium
For developers, pipenv can be used to install the development dependencies and enter a shell with them: pip install pipenv pipenv install --dev pipenv shell
Apertium packages can be installed from Python interpreter as well. Install apertium-all-dev by calling apertium.installer.install_apertium() Install language packages with apertium.installer.install_module(language_name). For example apertium-eng can be installed by executing apertium.installer.install_module('eng')
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page