Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dimazest committed Dec 21, 2013
1 parent 0e361f7 commit dfd43eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions fowler/corpora/google_ngrams/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def cooccurrence(
context=('c', 'context.csv.gz', 'The file with context words.'),
targets=('t', 'targets.csv.gz', 'The file with target words.'),
input_dir=('i', local('./downloads/google_ngrams/5_cooccurrence'), 'The path to the directory with the Google unigram files.'),
with_pos=('', False, 'Include ngrams that are POS tagged.'),
output=('o', 'matrix.h5', 'The output matrix file.'),
):
"""Build the cooccurrence matrix."""
Expand Down Expand Up @@ -110,11 +109,6 @@ def cooccurrence(
quoting=csv.QUOTE_NONE,
)

frame['ngram'].fillna('U+F8F0:<INVALIDCHARACTER>', inplace=True)

if not with_pos:
frame = frame[np.invert(frame['ngram'].str.contains('_'))]

piece = (
frame
.merge(targets, left_on='ngram', right_index=True, sort=False)
Expand Down
1 change: 0 additions & 1 deletion test/google_ngrams/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def targets_path(tmpdir):
'aa\n' # 5
'ab\n' # 6
'ac\n' # 7
'AA_NOUN\n' # 8
)

return path
Expand Down

0 comments on commit dfd43eb

Please sign in to comment.