Did you know ... Search Documentation:
Pack ape -- prolog/utils/morphgen.pl
PublicShow source
author
- Kaarel Kaljurand
version
- 2010-04-20
 format_dr(+Dr:nvar, -NiceDr:atom) is det
Arguments:
Dr- numbervared variable
NiceDr- pretty-printed numbervared variable
 surface_verb(+SgPlPart:atom, +Lemma:atom, -WordForm:atom) is det
Examples:
  • surface_verb(sg, know, knows)
  • surface_verb(pl, know, know)
  • surface_verb(part, know, known) BUGs:
  • reorder the arguments SgPl and Lemma
  • rewrite to support plural participles, i.e. we need 2 features: number = {sg, pl}, participleness = {yes, no}
  • maybe this would be faster than concat_atom/3: format(atom(WordForm), "is ~w by", [WordFormTmp])
  • this is a quick hack to make ACE Core verbalization work with i-verbs. @param SgPlPart {sg, pl, part}, is the number of the verb or its participleness @param Lemma lemma of the verb @param WordForm is the synthesized form of the verb
 surface_neg_verb(+SgPl:atom, +Lemma:atom, -WordForm:list) is det
BUG: We should also support participles here.
Arguments:
SgPl- {sg, pl}, is the number of the negated verb
Lemma- lemma of the negated verb
WordForm- is the synthesized form of the verb
 surface_adverb(+Adverb:atom, +Comparison:atom, -SurfaceText:list) is det
Note that comparative forms like 'faster', are lemmatized as 'fast'.
Arguments:
Adverb- is a lemma form of an adverb, as found in the DRS.
Comparision- is one of {pos, comp, sup}
SurfaceText- is a combination of the adverb and the comparision type.
 surface_property(+Adjective:atom, +Comparison:atom, -SurfaceText:list) is det
Note that comparative forms like 'better', are lemmatized as 'good'.
Arguments:
Adjective- is a lemma form of an adjective, as found in the DRS.
Comparision- is one of {pos, pos_as, comp, sup, comp_than}
SurfaceText- is a combination of the adjective and the comparision type.
 surface_property(+Adjective:atom, +Comparison:atom, +ComparisonTarget:atom, +Ref2Text:list, +Ref3Text:list, -SurfaceText:list) is det
Note that comparative forms like 'fonder-of', are lemmatized as 'fond-of'.

Examples:

  • [John is] as fond-of Mary as Bill
  • [John is] as fond-of Mary as of Bill
  • [John is] more fond-of Mary than Bill
  • [John is] more fond-of Mary than of Bill @param Adjective is a lemma form of an adjective, as found in the DRS. @param Comparision is one of {pos_as, comp_than} @param ComparisionTarget is one of {subj, obj} @param Ref2Text is the surface text of the 2nd NP argument of the property/6 @param Ref3Text is the surface text of the 3rd NP argument of the property/6 @param SurfaceText is a combination of the adjective, comparision type, comparison target, and the surface texts of the arguments
 surface_quotedstring(+DrsString:atomic, -QuotedString:atom) is det
Adds quotes around the atom within the DRS string(.), escaping also double quotes and backslashes. The result is an ACE quoted string.
Arguments:
DrsString- e.g. 'a\\b"c'
QuotedString- e.g. '"a\\\\b\"c"'
 surface_noun(+Type:atom, +Lemma:atom, ?Num:atom, -Form:term)
Examples:
surface_noun(cn,man,sg,man)
surface_noun(cn,somebody,sg,somebody)
surface_noun(cn,man,pl,men)
surface_noun(cn,sand,mass,sand)
Note: we do not add a prefix to unknown proper names unless they start with a lowercase character.

Note that in the presence of aliases, the mapping of lemmas to surface forms is not deterministic. Consider e.g. the mapping of surface forms to lemmas:

abaci->abacus
abacuses->abacus
As Clex does not include information about the main word vs its alias, we return whatever comes first.

@param Type is one of {cn, pn}, i.e. common noun or proper name @param Lemma is the lemma of the noun as found in the DRS @param Num is one of {sg, mass, pl} @param Form is the surface form of the noun (possibly a list of tokens)

@bug: possibly slow, because uses an unindexed argument

 get_di_marker(+SgPl:atom, +Lemma:atom, -SurfaceForm:term, -DiMarker:atom)
Looks up the prepositional marker of a ditransitive verb by its lemma and its number. (Note that the ACE lexicon allows the same lemma to have a different marker in singular and in plural context. This is not the case in English though.)
 acesentencelist_pp(+AceList:list, -AceText:atom) is det
Expects the input list to be a list of atoms (ACE sentences) or a list of lists of atoms (lists of ACE sentences). Produces an ACE text (atom).
Arguments:
AceList- is a list of (lists of) ACE sentences (atoms)
AceText- is an ACE text (atom)
 listlist_listatom(+ListOfList:list, -ListOfAtom:list) is det
Arguments:
ListOfList- is a list (ACE sentences) of lists (ACE tokens)
ListOfAtom- is a list of atoms (ACE sentences)
deprecated
- try to use tokens_to_sentences/2 instead

used only by Core ACE, NP ACE verbalizers, clean it up

 clear_vars is det
Retracts dynamic predicates: var/2, var_once/1, var_twice/1.
 add_var(+Var:nvar) is det
Asserts the (numbervared) variable so that we know if it has been used once or more times.
Arguments:
Var- is a numbervared discourse referent
 remove_singletons(+ListIn:list, -ListOut:list) is det
 remove_singletons_x(+VarCount:integer, +ListIn:list, -ListOut:list) is det