Word properties

From OpenCog
Jump to: navigation, search

RelEx will tag individual words in a sentence with many different possible properties or features. (The tags are also know as unary relations)

For example:

tense(invent, past)
pos(invent, verb)
pos(sliced, adj)
noun_number(bread, uncountable)
pos(bread, noun)
tense(do, past_infinitive)
HYP(do, T)
gender(it, neuter)
pos(it, noun)
pos(?, punctuation)
QUERY-TYPE(_$qVar, when)

Entity tags

Entity tags (such as the DATE-FLAG) are used to tag the head-word of an entity expression. Additional relations connect the head-word to the rest of the entity. Thus, the entity consists of the head-word, plus all of the dependents. For example:

It happened on December 3rd, 1990.

date-FLAG(December, T)
_date_year(December, 1990)
_date_day(December, 3rd)

Although only one word is flagged, the rest of the entity is identified through the dependent relations.

It lasted five years.

time-FLAG(years, T)
_quantity(years, five)

years is the head-word.

Table of feature tags

The various features are shown in the table below. This table is attempting to be authoritative.

Simple Name Examples Possible values FeatureNode name
Date 2 January 1967 T date-FLAG
Quantification definite determiner The, it T definite-FLAG
Emoticon  ;-) :-@ T emoticon-FLAG
Gender He, she, John, Mary, Pat masculine, feminine, person, neuter gender
Idiom - idiomatic phrases identified by parser some_more T idiom-FLAG
Location New York T location-FLAG
Unit of measure cm, Hz, newton T measure-FLAG
Money two shekels T money-FLAG
Number singular, plural, uncountable noun_number
Organization IBM Corp. T organization-FLAG
PartOfSpeech adj, adv, conjunction, det, noun, particle, prep, punctuation, verb, WORD POS
Person John, Mary Derwinski, Pat T person-FLAG
Polyword -- phrasal verbs w/ particle, comparisons w/ particle go_away, as_many T polyword-FLAG
Pronoun He, she T pronoun-FLAG
Query how, how_much, what, when, where, which, who, why QUERY-TYPE
Tense future, future progressive, imperative, infinitive, past, past infinitive, past progressive, perfect, present, present progressive, progressive tense
Time five years T time-FLAG


  • If a phrase is tagged with a part-of-speech of "verb" and is also tagged as a polyword, it should be understood to be a phrasal verb.
  • Tense tags can be combined with underscores; for example, tense(die, present_perfect) for has died. This is generated by RelEx in place of the aux and auxpass relations.