Rename file
This commit is contained in:
parent
9bbc8213a9
commit
e50f25b595
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
|||||||
.idea/polish-urban-legends-public.iml
|
.idea/polish-urban-legends-public.iml
|
||||||
.idea/vcs.xml
|
.idea/vcs.xml
|
||||||
.idea/inspectionProfiles/profiles_settings.xml
|
.idea/inspectionProfiles/profiles_settings.xml
|
||||||
|
.idea
|
||||||
|
@ -8,7 +8,7 @@ with open('stopwords') as f:
|
|||||||
stopwords = [line.rstrip() for line in f]
|
stopwords = [line.rstrip() for line in f]
|
||||||
|
|
||||||
|
|
||||||
def classify(path, n_clusters):
|
def create_clusters(path, n_clusters):
|
||||||
with open(path + 'in.tsv') as f:
|
with open(path + 'in.tsv') as f:
|
||||||
docs = [line.rstrip() for line in f]
|
docs = [line.rstrip() for line in f]
|
||||||
docs_preprocessed = []
|
docs_preprocessed = []
|
||||||
@ -26,5 +26,5 @@ def classify(path, n_clusters):
|
|||||||
file.write("%i\n" % label)
|
file.write("%i\n" % label)
|
||||||
|
|
||||||
|
|
||||||
classify('dev-0/', n_clusters=10)
|
create_clusters('dev-0/', n_clusters=10)
|
||||||
classify('test-A/', n_clusters=10)
|
create_clusters('test-A/', n_clusters=10)
|
Loading…
Reference in New Issue
Block a user