Snippet#
Application ID
eot_snippet
Application Aliases
snippet.app eot/snippet.app
Description#
The Snippet application extends your pipeline with a small set of rules or lexicons. This is mostly useful during development and debugging.
Configuration#
The configuration is an object defined as (bold = required, italic = optional):
source (
string
) – The Wowool code that should be added
Example#
Annotating a Person followed by a Company:
wow -p 'english,entity,snippet(source = "rule:{ Person .. Company }= PersonCompany;"}).app' \
-i "John Smith works for EyeOnText."
Alternatively, you can use the short form notation, which avoids issues with quotes on the command line:
wow -p 'english,entity,snippet(rule:{ Person .. Company }= PersonCompany;).app' \
-i "John Smith works for EyeOnText."
which yields:
S:( 0, 31)
C:( 0, 31): Sentence
snippet> C:( 0, 30): PersonCompany
C:( 0, 10): Person,@(canonical='John Smith' family='Smith' gender='male' given='John' )
C:( 0, 10): NP
C:( 0, 4): PersonGiv
C:( 0, 4): GivenName,@(gender='male' standalone='Yes' )
T:( 0, 4): John,{+giv, +init-cap, +init-token},[John:Prop-Std]
C:( 5, 10): PersonFam
T:( 5, 10): Smith,{+fam, +init-cap},[Smith:Prop-Std]
C:( 11, 16): VP,@(negation='false' voice='active' )
T:( 11, 16): works,[work:V-Pres-3-Sg]
T:( 17, 20): for,[for:Prep-Std]
C:( 21, 30): NP
C:( 21, 30): Company,@(country='Belgium' sector='it' )
T:( 21, 30): EyeOnText,{+init-cap, +nf},[EyeOnText:Prop-Std]
T:( 30, 31): .,[.:Punct-Sent]