relative_minpair_fl¶
-
corpustools.funcload.functional_load.
relative_minpair_fl
(corpus_context, segment, relative_count_to_relevant_sounds=False, relative_count_to_whole_corpus=True, distinguish_homophones=False, output_filename=None, environment_filter=None, prevent_normalization=False, stop_check=None, call_back=None)[source]¶ Calculate the average functional load of the contrasts between a segment and all other segments, as a count of minimal pairs.
Parameters: - corpus_context : CorpusContext
Context manager for a corpus
- segment : str
The target segment.
- relative_count_to_relevant_sounds : bool, optional
If True, divide the number of minimal pairs by the total number of words that contain either of the two segments.
- 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: - int or float
If relative_count_to_relevant_sounds`==False and `relative_count_to_whole_corpus`==False, returns an int of the raw number of minimal pairs. If `relative_count_to_relevant_sounds`==True, returns 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.