Commit 5163f92a authored by Tags's avatar Tags

Change to 50%

parent ce54f918
......@@ -5,7 +5,6 @@ import nltk
import numpy as np
import _mysql
# noinspection PyUnresolvedReferences
class Classifier:
def __init__(self, corpus=None, host='176.58.117.151', user='esi', password='esi12345', db='esi', port=3306):
......@@ -163,7 +162,7 @@ class Classifier:
# exit(0)
@property
def tag_accordance(self, persantage=10):
def tag_accordance(self, persantage=50):
"""
Class method for computing % af tag accordance
:return: tuple of % af tag accordance
......@@ -179,7 +178,8 @@ class Classifier:
if item[1] < persantage / 100: continue
# print (item[0], item[1], self.tags[item[0] - 1][1].decode ("ascii", 'ignore'), end=", ")
vector_accordance.append(
(item[0], int(item[1] * 1000) / 10, self.tags[item[0] - 1][1].decode("ascii", 'ignore')))
(item[0], int(item[1] * 1000) / 10,
self.tags[item[0] - 1][1].decode("ascii", 'ignore')))
return vector_accordance
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment