relative_minpair_fl¶
-
corpustools.funcload.functional_load.
relative_minpair_fl
(corpus_context, segment, relative_count=True, distinguish_homophones=False, output_filename=None, environment_filter=None, 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 : bool, optional
If True, divide the number of minimal pairs by the total count by the total number of words that contain either of the two segments.
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`==False, returns an int of the raw number of minimal pairs. If `relative_count`==True, returns a float of that count divided by the total number of words in the corpus that include either `s1 or s2.