Themes#

Application ID eot_word_sense

Application Aliases word-sense.app eot/word-sense.app

Description#

The Word Sense application is used to disambiguate things depending of the themes or the content os the document. Currently it requires the themes application to have run. It will relies on the document has been annotated with the WordSense annotation. So you can add you own word sense disambiguation rules. The uri WordSense will need to have 2 attributes:

  • concept : The expected URI, like Company

  • on_theme : The terms that if you have seen them in the themes information then you do not want to see. format is “COMMA_SEPARATED_TERMS:URI”

Ex : WordSense@(concept=”Company”,on_theme=”sports,food:FootballClub”) if you just want to remove it. Ex : WordSense@(concept=”Company”,on_theme=”sports”)

Example#

wow -p 'english,entity,semantic-theme,themes.app,snippet(lexicon:{Bayer}=WordSense@(concept="Company",on_theme="sports");).app,word-sense.app' \
    -i "The Bayer 04 Leverkusen professional soccer team is the flagship of the Bayer's top teams."

which yields:

In this case we see that Bayer is no longer a Company

S:(  0, 90)
C:(  0, 90): Sentence
T:(  0,  3): The,{+init-cap, +init-token},[the:Det-Def]
C:(  4, 23): Organization,@(theme='sports' )
T:(  4,  9): Bayer,{+init-cap},[Bayer:Prop-Std]
T:( 10, 12): 04,[04:Num]
C:( 13, 23): Theme
C:( 13, 23): City,@(country='Germany' )
T:( 13, 23): Leverkusen,{+init-cap, +org},[Leverkusen:Prop-Std]
T:( 24, 36): professional,[professional:Adj-Std]
C:( 37, 43): Theme,@(theme='sports' )
T:( 37, 43): soccer,[soccer:Nn-Sg]
T:( 44, 48): team,[team:Nn-Sg]
T:( 49, 51): is,[be:V-Pres-Sg-be]
T:( 52, 55): the,[the:Det-Def]
T:( 56, 64): flagship,[flagship:Nn-Sg]
T:( 65, 67): of,[of:Prep-of]
T:( 68, 71): the,[the:Det-Def]
T:( 72, 77): Bayer,{+init-cap},[Bayer:Prop-Std]
T:( 77, 79): 's,['s:Part-Poss]
T:( 80, 83): top,[top:Nn-Sg]
T:( 84, 89): teams,[team:Nn-Pl]
T:( 89, 90): .,[.:Punct-Sent]

app='eot_themes'
[
   {
      "name": "sports",
      "relevancy": 100
   },
   {
      "name": "pharma",
      "relevancy": 50
   }
]