ssm.compositionality: Find a segmentation that maximises the overall coverage of...

Description Usage Arguments See Also Examples

View source: R/compositionality.R

Description

This algorithm builds on Spike's measure of compositionality (see sm.compositionality), except instead of simply determining which segment(s) which have the highest mutual predictability for each meaning feature separately, it tries to find a combination of non-overlapping segments that maximises the overall string coverage over all signals. In other words, it tries to find a segmentation which can account for (or 'explain') as much of the string material in the signals as possible.

Usage

1
2
3
ssm.compositionality(x, y, groups = NULL)

ssm.segmentation(x, y, mergefeatures = FALSE, verbose = FALSE)

Arguments

x

a list or vector of character sequences

y

a matrix or data frame with as many rows as there are strings (see section Meaning data format)

groups

a list or vector with as many items as strings, used to split the signals and meanings into data sets for which the compositionality measures are computed separately.

mergefeatures

logical: if TRUE, ssm.segmentation will try to improve on the initial solution by incrementally merging pairs of meaning features as long as doing so improves the overall string coverage of the segmentation.

verbose

logical: if TRUE, messages detailed information about the number of segment combinations considered for every coverage computed.

See Also

sm.compositionality

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ssm.segmentation(c("as", "bas", "basf"),
  cbind(a=c(TRUE, FALSE, TRUE), b=c(FALSE, TRUE, TRUE)))

# signaling system where a distinction is not encoded
print(threebytwoanimals <- enumerate.meaningcombinations(list(animal=c("dog", "cat", "tiger"),
  colour=c("col1", "col2"))))

ssm.segmentation(c("greendog", "bluedog", "greenfeline", "bluefeline", "greenfeline", "bluefeline"),
  threebytwoanimals)

# do the same thing again, but allow merging of features
ssm.segmentation(c("greendog", "bluedog", "greenfeline", "bluefeline", "greenfeline", "bluefeline"),
  threebytwoanimals, mergefeatures=TRUE)

kevinstadler/cultevo documentation built on June 29, 2017, 8 p.m.