Skip to content

Conversation

@saarzhanova
Copy link
Owner

No description provided.

@saarzhanova saarzhanova requested a review from Elena-NSU May 27, 2021 10:23
tfidf_1.py Outdated
for item in _tf_txt:
tf.append((item, _tf_txt[item] / len(text)))

if os.path.isfile('idf.json'):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

у тебя получается, что для каждого входного текста ты либо считаешь, либо загружаешь файл с idf - почему это не сделать один раз в конструкторе?

tfidf_1.py Outdated
sent.append(source.text)
for i in sent:
self._texts.append(re.sub(r'[^\w\s]', '', i.lower()))
if os.path.exists('idf_file'):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а почему на существование проверяется файл с одним названием, а загружается информация из другого? это же должен быть всё один файл?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ой, это я опечаталась

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

должен быть 'idf_file.json' судя по коду ниже. но уже ладно, зачтено задание:)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

фух! спасибо)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants