Skip to content

Commit

Permalink
Trying again
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe committed Feb 25, 2015
1 parent ec98173 commit b3cbd69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion corpustools/freqalt/freq_of_alt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def calc_freq_of_alt(corpus, s1, s2, relator_type, count_what,
min_rel = None, max_rel = None, phono_align = False,
min_pairs_okay = False, from_gui=False, stop_check = None,
call_back = None):
"""Returns a double that is a measure of the frequency of alternation of two sounds in a given corpus
"""Returns a double that is a measure of the frequency of
alternation of two sounds in a given corpus
Parameters
----------
Expand Down
8 changes: 6 additions & 2 deletions corpustools/funcload/functional_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,16 @@ def relative_deltah_fl(corpus, segment, frequency_cutoff = 0,
Specify whether entropy is based on type or token frequency.
sequence_type : string
The attribute of Words to calculate FL over. Normally this will be the transcription, but it can also be the spelling or a user-specified tier.
The attribute of Words to calculate FL over. Normally this
will be the transcription, but it can also be the spelling or a
user-specified tier.
Returns
-------
float
The difference between a) the entropy of the choice among non-homophonous words in the corpus before a merger of `s1` and `s2` and b) the entropy of that choice after the merger.
The difference between a) the entropy of the choice among
non-homophonous words in the corpus before a merger of `s1`
and `s2` and b) the entropy of that choice after the merger.
"""
all_segments = list(set(itertools.chain.from_iterable([segment for word in corpus for segment in getattr(w, sequence_type)])))
segment = segment[:]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nose
sphinx
sphinx>=1.2.4
numpydoc

0 comments on commit b3cbd69

Please sign in to comment.