Learn R Programming

MoLE (version 1.0.1)

DECOMPOSE: Decompose words into morphemes

Description

Decomposes words into morphemes on the basis of the lexical entries in the lexicon. If multiple decompositions are possible, all are returned.

Usage

DECOMPOSE(hearerID, form)

Arguments

hearerID

Pointer to hearer agent

form

Word form that is considered for decomposition

Value

A vector with morphologically analyzed words, in which morpheme-s are separate-d by hyphen-s ("-")

Details

Decomposition is not trivial: Because of sloppy pronunciation (PRODUCE) and differences between speakers, mental representations of morphemes need not match one-to-one the parts of an utterance. Zero morphemes are not allowed. Reduced forms may become suffixes too. Suffixes must be minimally erosionMax long (should be automatically satisfied...). Function applies recursively (max twice)

See Also

ANALYZE

Examples

Run this code
# NOT RUN {
FOUND()
old=world$suffixThreshold
situation=SITUATION(1)
proposition=PROPOSITION(1, situation)
(utterance=PRODUCE(1, proposition))
(utterance=gsub(' ', '', utterance))
world$suffixThreshold=20
DECOMPOSE(2, utterance)
world$suffixThreshold=old
# }

Run the code above in your browser using DataLab