dkpro / dkpro-jwktl

Java Wiktionary Library
http://dkpro.org/dkpro-jwktl/
Apache License 2.0
57 stars 25 forks source link

Context information for alternative meanings #20

Open chmeyer opened 9 years ago

chmeyer commented 9 years ago

Originally reported on Google Code with ID 20

Hello, thanks for an awesome library.
I want to propose new feature, for words with a multiply senses there is often a context
information in wiktionary that is missing in your API.
Please take a look on the page https://en.wiktionary.org/wiki/fly - 
the word has a number of different senses with contexts like (obsolete), (baseball),(weightlifting)

Could you please add this functionality or point me where to look in sources to add
it.

Reported by acc4konstantin on 2015-05-21 13:04:29

chmeyer commented 9 years ago
Feature is trivial, I'l implement it myself.

Reported by acc4konstantin on 2015-05-21 13:31:33

chmeyer commented 9 years ago
I see that {{context|$context|lang=en}} is saved in gloss field of Sense. So it can
be extracted from it. 

Reported by acc4konstantin on 2015-05-21 14:08:57

chmeyer commented 9 years ago
Currently, the only solution is to post process the sense definition and extract the
context labels. It might be worth to add API or even parser functionality for this.
Ideally, this should also deal with other types of labels (i.e., those not using the
context template).

Reported by chmeyer.de on 2015-05-26 07:45:50