Skip to content

Commit

Permalink
nltk import added
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunseo-Han committed Nov 14, 2021
1 parent 579cf4a commit 3590d65
Show file tree
Hide file tree
Showing 11 changed files with 3,444 additions and 3,414 deletions.
3 changes: 3 additions & 0 deletions hw4/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "C:\\Python39\\python.exe"
}
Binary file added hw4/__pycache__/preprocess.cpython-39.pyc
Binary file not shown.
Binary file added hw4/__pycache__/wordcounter.cpython-39.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions hw4/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
from wordcounter import WordCounter
from preprocess import pre_process

import nltk
nltk.download('stopwords')


def mutual_info(_fxy, _N, _fx, _fy):
"""
Expand Down
1,532 changes: 766 additions & 766 deletions hw4/neg_train.csv

Large diffs are not rendered by default.

170 changes: 85 additions & 85 deletions hw4/neg_val.csv

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions hw4/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,28 @@ N1: ludicrous
N2: seagal
N3: uninvolving
N4: chuckle
N5: idiotic
The top 5 positive words:
P1: gripping
P2: outstanding
P3: astounding
P4: affecting
P5: avoids
The top 5 negative words:
N1: sucks
N2: ludicrous
N3: schumacher
N4: inject
N5: idiotic
The top 5 positive words:
P1: astounding
P2: outstanding
P3: avoids
P4: fascination
P5: animators
The top 5 negative words:
N1: sucks
N2: unintentional
N3: ludicrous
N4: atrocious
N5: idiotic
1,526 changes: 763 additions & 763 deletions hw4/pos_train.csv

Large diffs are not rendered by default.

174 changes: 87 additions & 87 deletions hw4/pos_val.csv

Large diffs are not rendered by default.

3,082 changes: 1,541 additions & 1,541 deletions hw4/train.csv

Large diffs are not rendered by default.

344 changes: 172 additions & 172 deletions hw4/val.csv

Large diffs are not rendered by default.

0 comments on commit 3590d65

Please sign in to comment.