Lexical annotations.

12 views
Skip to first unread message

Francesco Cecconi

unread,
Apr 15, 2013, 9:22:17 AM4/15/13
to jowkl...@googlegroups.com
Hello JOWKL developers,

is possible to retrieve, for defined meaning, the Lexical annotations ?

Ex:

word: break
meaning: To end up in two or more pieces, which can't easily be reassembled.
 -> Lexical annotations ( word class | verb)

Best Regards,
Francesco Cecconi

Michael Matuschek

unread,
Apr 16, 2013, 3:42:24 AM4/16/13
to jowkl...@googlegroups.com
Dear Francesco,

yes, it is possible, but due to the structure of OmegaWiki it is not really straightforward.

As you can see on the OW page (http://www.omegawiki.org/DefinedMeaning:break_%28333586%29), the POS and other information are not attached to the Defined Meaning itself, but rather to the Expressions (i.e. there is a part of speech attribute for each translation). Thus, you have to obtain these Expressions and then get the annotations for these:

Set<DefinedMeaning> senses = ow.getDefinedMeaningByWord("break",OWLanguage.English);
for (DefinedMeaning dm :senses )
{
for (SynTrans st : dm.getSynTranses())
{
for(Annotation anno : st.getAnnotations()) {
System.out.println(anno);
}
}
}

Hope that helps!

Cheers,

Michael

Francesco Cecconi

unread,
Apr 16, 2013, 5:37:50 AM4/16/13
to jowkl...@googlegroups.com
Hi Micheal,

On Tuesday 16 April 2013 00:42:24 Michael Matuschek wrote:
> Dear Francesco,
>
> yes, it is possible, but due to the structure of OmegaWiki it is not really
> straightforward.

Yes, I'm seeing. :)

>
> As you can see on the OW page (
> http://www.omegawiki.org/DefinedMeaning:break_%28333586%29), the POS and
> other information are not attached to the Defined Meaning itself, but
> rather to the Expressions (i.e. there is a part of speech attribute for
> each translation). Thus, you have to obtain these Expressions and then get
> the annotations for these:
>
> Set<DefinedMeaning> senses =
> ow.getDefinedMeaningByWord("break",OWLanguage.English);
> for (DefinedMeaning dm :senses )
> {
> for (SynTrans st : dm.getSynTranses())
> {
> for(Annotation anno : st.getAnnotations()) {
> System.out.println(anno);
> }
> }
> }

Thanks a lot for your answer, the suggestion, and for to have shared your work.

>
> Hope that helps!
>
> Cheers,
>
> Michael
>
> Am Montag, 15. April 2013 15:22:17 UTC+2 schrieb Francesco Cecconi:
> >
> > Hello JOWKL developers,
> >
> > is possible to retrieve, for defined meaning, the Lexical annotations ?
> >
> > Ex:
> >
> > word: break
> > meaning: To end up in two or more pieces, which can't easily be
> > reassembled.
> > -> Lexical annotations ( word class | verb)
> >
> > Best Regards,
> > Francesco Cecconi
> >
>
>

Cheers,
Francesco
signature.asc
Reply all
Reply to author
Forward
0 new messages