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

Extract domain labels from the sense definition #2

Open
chmeyer opened this issue Aug 4, 2015 · 7 comments
Open

Extract domain labels from the sense definition #2

chmeyer opened this issue Aug 4, 2015 · 7 comments

Comments

@chmeyer
Copy link
Member

chmeyer commented Aug 4, 2015

Originally reported on Google Code with ID 2

Hi I have two questions concerning querying through the API the knowledge domain and
the synonyms of entries 

Two questions please:

1- can I also get the domain of an entry using your api? For example, find out that
"Diabetes" is a word of the domain "Medizin".

When you enter "Diabetes" in Wiktionary, you will indeed see its "Bedeutung" prefixed
with the word "Medizin". Thats why I wonder if your api also covers this information.

2- I have the same question concerning the synonyms: is there a method like "entry.getSynonyms()"?
I could not find a method that returns the synonyms of an entry.

Thank you in advance.
Best

Abou


Reported by abdoulaye.drame@neofonie.de on 2013-08-21 15:44:00

@chmeyer
Copy link
Member Author

chmeyer commented Aug 4, 2015

1) To date, the domain label is part of the sense definition text. There is some code
in the incubator that needs to be integrated into JWKTL which takes care about separating
out the domain labels from the sense definition. I'll change this issue to an enhancement
issue.

2) Synonyms can be accessed at the lexical entry level

entry.getRelations(RelationType.SYNONYM);

or at the word sense level:

entry.getSense(1).getRelations(RelationType.SYNONYM);

See documentation for details.

Reported by chmeyer.de on 2013-08-26 09:39:18

  • Status changed: Accepted
  • Labels added: Type-Enhancement, Milestone-Release-1.1, Component-Parser
  • Labels removed: Type-Defect

@siabar
Copy link

siabar commented Feb 27, 2017

Hi, Chmeyer.

To get synonym at the word sense level, I tried your code:

for (IWiktionarySense sense : entry.getSenses()) { for (IWiktionaryRelation relation : sense.getRelations(RelationType.SYNONYM)) { print(relation.getTarget());

For dictionary word: https://en.wiktionary.org/wiki/dictionary

It should return Synonyms: wordbook for first sense, but it returns null.

or for https://en.wiktionary.org/wiki/cat

for all sense, it returns null synonym except the eighth sense that it return all synonym!! for all sense.

What is the problem?

With Best Wishes,
-Siamak

@jberkel
Copy link
Contributor

jberkel commented Feb 27, 2017

Hello Siamak, there have been some changes to the way synonyms are formatted on Wiktionary. Therefore JWKTL needs to be updated to parse the new templates.

@siabar
Copy link

siabar commented Feb 27, 2017

So, In next version it is possible? Correct? And if yes, When the next version will be available?

@jberkel
Copy link
Contributor

jberkel commented Feb 27, 2017

I'll very likely work on this soon since I need to parse synonyms as well. Can't promise any exact dates though.

@siabar
Copy link

siabar commented Feb 27, 2017

Thanks anyway :). Hopefully, you find a free time soon :)

@jberkel
Copy link
Contributor

jberkel commented Mar 14, 2017

@siabar please try the latest snapshot

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

No branches or pull requests

3 participants