Learn R Programming

soundcorrs (version 0.4.0)

summary.soundcorrs: Generate a segment-to-segment contingency table for two languages.

Description

Produce a contingency table detailing all segment-to-segment correspondences in a dataset.

Usage

# S3 method for soundcorrs
summary(object, count = "a", unit = "w", ...)

Arguments

object

[soundcorrs] The dataset from which to draw frequencies. Only datasets with two languages are supported.

count

[character] Report either the absolute or the relative numbers?. Accepted values are "a(bs(olute))" and "r(el(ative))". Defaults to "a".

unit

[character] Count how many times a correspondence occurs or in how many words it occurs? Accepted values are "o(cc(ur(ence(s))))" and "w(or(d(s)))". Defaults to "w".

...

Unused; only for consistency with base::summary.

Value

[table] The contingency table. The values represent how often the given segments correspond to each other, not how often they co-occur in the same word (cf. coocc).

Details

A set of segmented and aligned word pairs/triples/..., such as one held in a soundcorrs object, can be turned into a contingency table in more than one way. Perhaps the simplest option is to see how often various segments from one language correspond to various segments from another language, which is the kind of table this function produces. Correspondences can be reported in absolute or relative numbers, and can represent the number of times the given correspondence occurs, or in how many words it occurs (the same correspondence can occur more than once in a single pair/triple/... of words, e.g. in German koala : French koala, the correspondence G a : Fr a occurs twice). When the numbers are relative, each row in the table adds up to 1. In theory, summary.soundcorrs can support a soundcorrs objects with any number of languages in it, but the legibility of the output drops very quickly when that number exceeds two.

See Also

coocc

Examples

Run this code
# NOT RUN {
dataset <- loadSampleDataset ("data-ie")
summary (dataset)
round (summary(dataset,count="r"), digits=3)
summary (dataset, unit="o")
# }

Run the code above in your browser using DataLab