minpair_fl

corpustools.funcload.functional_load.minpair_fl(corpus_context, segment_pairs, relative_count_to_relevant_sounds=False, relative_count_to_whole_corpus=True, distinguish_homophones=False, environment_filter=None, prevent_normalization=False, stop_check=None, call_back=None)[source]

Calculate the functional load of the contrast between two segments as a count of minimal pairs.

Parameters:

corpus_context : CorpusContext

Context manager for a corpus

segment_pairs : list of length-2 tuples of str

The pairs of segments to be conflated.

relative_count_to_relevant_sounds : bool, optional

If True, divide the number of minimal pairs by by the total number of words that contain either of the two segments. # changed the name of this from “relative_count” to “relative_count_to_relevant_sounds” # set its default to False above

relative_count_to_whole_corpus : bool, optional

If True, divide the number of minimal pairs by the total number of words in the corpus (regardless of whether those words contain the target sounds). Defaults to True.

distinguish_homophones : bool, optional

If False, then you’ll count sock~shock (sock=clothing) and sock~shock (sock=punch) as just one minimal pair; but if True, you’ll overcount alternative spellings of the same word, e.g. axel~actual and axle~actual. False is the value used by Wedel et al.

environment_filter : EnvironmentFilter

Allows the user to restrict the neutralization process to segments in particular segmental contexts

stop_check : callable, optional

Optional function to check whether to gracefully terminate early

call_back : callable, optional

Optional function to supply progress information during the function

Returns:

tuple(int or float, list)

Tuple of: 0. if relative_count_to_relevant_sounds`==False and `relative_count_to_whole_corpus`==False, an int of the raw number of minimal pairs; if `relative_count_to_relevant_sounds`==True, a float of that count divided by the total number of words in the corpus that include either `s1 or s2; if `relative_count_to_whole_corpus`==True, a float of the raw count divided by the total number of words in the corpus; and 1. list of minimal pairs.