Did you know ... Search Documentation:
Pack ape -- prolog/utils/ace_niceace.pl
PublicShow source
- Kaarel Kaljurand
- 2012-01-04

This code does the following:

  • a -> an (if appropriate)
  • connect every comma, period, and question mark to the preceding word
 tokens_to_sentences(+ListOfList:list, -ListOfAtom:list) is det
ListOfList- is a list (ACE sentences) of lists (ACE tokens)
ListOfAtom- is a list of atoms (ACE sentences)
- get rid of 'ERROR' (maybe fail in this case?)

called from: get_ape_results

 pronoun_split(+Token:atom, -TokenPair:term) is semidet
pronoun_split(-Token:atom, +TokenPair:term) is nondet
Token- is an ACE token
TokenPair- is a list of 2 tokens, the 2nd of which is one of {-thing, -body, -one}
 atom_capitalize(+Atom:atom, -CapitalizedAtom:atom) is det
Simple predicate to capitalize those ACE words which can occur in the beginning of the sentence.

TODO: every preposition can also start a sentence

 ace_niceace(+TokenListIn:list, -TokenListOut:list) is det
TokenListIn- is a list of ACE tokens
TokenListOut- is a list of ACE tokens
To be done
- Some of these transformations (e.g. a -> an) should be optional.
 word_article(+Word:atom, -Article:atom) is det
This code decides on the article (of the noun phrase) on the basis of a word (either adjective or noun).

See also: http://en.wikipedia.org/wiki/A_and_an

Word- is an ACE token
Article- is an ACE indefinite article, one of {a, an}

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 pronoun_split(Arg1, Arg2, Arg3)