Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Laboratory work #4, Tatiana Zheleznova - 22FPL2 #181

Closed
wants to merge 105 commits into from

Conversation

tanya-iron
Copy link

Here we go again

tanya-iron and others added 30 commits September 14, 2023 16:57
…исправила стиль кода и все ошибки mypy. Надеюсь, убрала ошибку в start.py.
clean_text = ''
for symbol in new_text.lower():
if symbol.isalpha or symbol.isspace() or symbol == self._end_of_word_token:
clean_text += symbol
Copy link
Contributor

Choose a reason for hiding this comment

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

string concatination is a bad way

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, Artyom from the Past

Copy link
Author

Choose a reason for hiding this comment

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

fixed, both Artyoms

@@ -56,6 +74,10 @@ def _postprocess_decoded_text(self, decoded_corpus: tuple[str, ...]) -> str: #
Raises:
ValueError: In case of inappropriate type input argument or if input argument is empty.
"""
if not isinstance(decoded_corpus, tuple) or not decoded_corpus:
return ValueError
decoded_text = ' '.join(decoded_corpus).replace(self._end_of_word_token, '.').capitalize()
Copy link
Contributor

Choose a reason for hiding this comment

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

split into 2 lines, please

Copy link
Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@artyomtugaryov artyomtugaryov left a comment

Choose a reason for hiding this comment

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

What about start.py?

clean_text = ''
for symbol in new_text.lower():
if symbol.isalpha or symbol.isspace() or symbol == self._end_of_word_token:
clean_text += symbol
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, Artyom from the Past

Copy link
Contributor

@artyomtugaryov artyomtugaryov left a comment

Choose a reason for hiding this comment

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

Where is start.py?

@vitazaytseva
Copy link

Well done! Good job!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants