Make it easy to use a local / non-installed repo
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- developer-experience
Research direction
Start in apertium/analysis/init.py and trace search_path(), append_pair_path(), Analyzer, and analyze() using the reproduced apertium-quc examples. Clarify how locally compiled modules are discovered and define what successful registration and analysis should look like, including the reported sed failure and confusing API naming.
Written by the indexing model from the issue text.
Description
It's not at all clear how to use existing compiled modules. e.g. I have apertium-quc on my local system, how do I add that repo to be able to use it?
I tried:
>>> apertium.search_path('/home/fran/source/apertium/languages')
And it returns some stuff but doesn't seem to change state:
>>> apertium.analyze('quc-morph', 'we')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/fran/source/apertium/trunk/apertium-python/apertium/analysis/__init__.py", line 84, in analyze
analyzer: Analyzer = Analyzer(lang)
File "/home/fran/source/apertium/trunk/apertium-python/apertium/analysis/__init__.py", line 25, in __init__
raise apertium.ModeNotInstalled(self.lang)
apertium.ModeNotInstalled: quc-morph
Probably the ideal thing would be to had something like:
>>> apertium.load_module('/home/fran/source/apertium/languages/apertium-quc')
But the whole way this works is kind of confusing in general.
I also tried:
>>> apertium.append_pair_path('/home/fran/source/apertium/languages/apertium-quc')
>>> apertium.analyze('quc-morph', 'we')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/fran/source/apertium/trunk/apertium-python/apertium/analysis/__init__.py", line 84, in analyze
analyzer: Analyzer = Analyzer(lang)
File "/home/fran/source/apertium/trunk/apertium-python/apertium/analysis/__init__.py", line 25, in __init__
raise apertium.ModeNotInstalled(self.lang)
apertium.ModeNotInstalled: quc-morph
>>> apertium.Analyzer('quc')
<apertium.analysis.Analyzer object at 0x7f27c4bfb190>
>>> a = apertium.Analyzer('quc')
>>> a.analyse('we')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Analyzer' object has no attribute 'analyse'
>>> a.analyze('we')
sed: -e expressió #1, caràcter 1: ordre desconeguda: «"»
[]
So, sed doesn't seem to work, and the naming of append_pair_path() is strange, it should probably be just register_module() or load_module().
- Dominant language
- Python
- Stars
- 35
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apertium/apertium-python
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
apertium/apertium-python#109 · 2 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
apertium/apertium-python#108 · 10 comments · 1 reaction ·
-
segfault Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apertium/apertium-python#106 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apertium/apertium-python#105 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apertium/apertium-python#102 · 3 comments ·
All issues in apertium/apertium-python
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100