Wordnet sqlite Synonyms and Samples

前端 未结 2 1383
后悔当初
后悔当初 2021-01-27 16:20

I am trying to get the list of Synonyms and Samples given the wordid. After a lot of trial and error I can get the samples for all the synsets but not the actual synonyms. Here

2条回答
  •  天命终不由人
    2021-01-27 16:48

    EDIT after schema publication

    It appears that the senses table captures all relationships between each word and all its synsets and should be used in conjunction with inner join with words and synsets tables to to unravel all relationships

    select sen.wordid,
             w.lemma,
             w.mantiq,
           sen.senseid,
           sen.synsetid,
           syn.definition,
    from senses sen 
    inner join words w on sen.wordid = w.wordid
    inner join synsets syn on sen.synsetid = syn.synsetid
    order by sen.wordid, sen.synsetid;
    

    You do not need a LEFT JOIN since the fields you join upon do not appear to be nullable.

提交回复
热议问题