Permalink
Browse files

Fixed case-insensitive issue in a few corpuses.

Fixed issue with every column being dropped when doing case-insensitive queries in the German, Chinese, and Hebrew corpuses.

This is my solution to [Issue 6](#6).
  • Loading branch information...
1 parent 71fb09a commit 571c784e79a28341ef02843dccc174d03bb7e3a6 @econpy committed Jan 2, 2014
Showing with 5 additions and 3 deletions.
  1. +5 −3 getngrams.py
View
@@ -90,10 +90,12 @@ def runQuery(argumentString):
if not allData:
if caseInsensitive is True:
for col in df.columns:
- if col.count('(All)') == 0 and col != 'year':
- df.pop(col)
- elif col.count('(All)') == 1:
+ if col.count('(All)') == 1:
df[col.replace(' (All)', '')] = df.pop(col)
+ elif col.count(':') == 1 and col.count('_') >= 1:
+ pass
+ elif col.count('(All)') == 0 and col != 'year':
+ df.pop(col)
if '_INF' in query:
for col in df.columns:
if '_INF' in col:

0 comments on commit 571c784

Please sign in to comment.