Skip to content

Commit

Permalink
Update contextmanagers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kchall committed Mar 21, 2017
1 parent 80c115e commit dd85432
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions corpustools/contextmanagers.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,17 @@ def get_frequency_base(self, gramsize = 1, halve_edges = False, probability = Fa

def get_phone_probs(self, gramsize = 1, probability = True, preserve_position = True, log_count = True):
"""
Generate (and cache) phonotactic probabilities for segments in
the Corpus. # <- this doesn't seem right: surely it's just their probability (frequency) in the corpus, not their phonotactic probability? --KCH
Generate (and cache) probabilities for segments (or strings of segments of gramsize) in
the Corpus.
Parameters
----------
gramsize : integer
Size of n-gram to use for getting frequency, defaults to 1 (unigram)
probability : boolean
If True, frequency counts will be normalized by total frequency,
defaults to False # <- doesn't it default to True as defined above? -- KCH
defaults to True
preserve_position : boolean
If True, segments will in different positions in the transcription
Expand All @@ -137,7 +137,7 @@ def get_phone_probs(self, gramsize = 1, probability = True, preserve_position =
-------
dict
Keys are segments (or sequences of segments) and values are
their phonotactic probability in the Corpus # <- as above; KCH
their probability in the Corpus
"""
if (gramsize, preserve_position, log_count) not in self._freq_base:
freq_base = collections.defaultdict(float)
Expand Down

0 comments on commit dd85432

Please sign in to comment.