Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive not working? #9

Open
robertmiles3 opened this issue Apr 24, 2020 · 1 comment
Open

Derive not working? #9

robertmiles3 opened this issue Apr 24, 2020 · 1 comment

Comments

@robertmiles3
Copy link

Hello there. I love this project and have been trying to get it working locally to do some research. However, I have hit an issue. For example, if I run the following python:

#!/usr/bin/python
import ElixirFM as elixir

print("\nlookup (unpretty):")
lookup = elixir.lookup("أُخْرَوِيّ")
print(elixir.unpretty(lookup, "lookup"))
print("\ncode:")
code = elixir.unpretty(lookup, "lookup")[0][0][1][1][0]
print(code)
print("\nderive:")
derive = elixir.derive(code)
print(derive)

it produces this:

image

The derive function just spits back out the "(121,11)" code instead of actually deriving it. However, the web version of ElixirFM seems to work fine (link). Why would the derive work on the web version but not this Python version? But, if I run it with another word...

#!/usr/bin/python
import ElixirFM as elixir

print("\nlookup (unpretty):")
lookup = elixir.lookup("استسلم")
print(elixir.unpretty(lookup, "lookup"))
print("\ncode:")
code = elixir.unpretty(lookup, "lookup")[0][0][1][1][0]
print(code)
print("\nderive:")
derive = elixir.derive(code)
print(derive)

it seems to work just fine:

image

Am I missing something? The first scenario only works on the web.

@otakar-smrz
Copy link
Owner

otakar-smrz commented Feb 18, 2022

Hi, Robert! I apologize for having left this without a response for so long. The derive function works only within verbs, masdars, and participles.
The first example only looks up the word index (121,11) in the lexicon and shows the entry. Compare this with the derived forms for (8192,31), which are actually listed below the given lexical entry.
Other kinds of derivation are not done automatically, as they depend on the real usage. However, you can observe the etymology in the morphophonemic templates, such as going from <'A_har> ~ HACaL to <'u_hrY> ~ FuCLY to <'u_hrawIy> ~ FuCLY |< Iy to <'u_hrawIyaT> ~ FuCLY |< Iy |< aT:
image
Hope this still helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants