Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Week 1: Invalid Syntax #91

Closed
ashraf21c opened this issue Nov 17, 2020 · 2 comments
Closed

Week 1: Invalid Syntax #91

ashraf21c opened this issue Nov 17, 2020 · 2 comments

Comments

@ashraf21c
Copy link

ashraf21c commented Nov 17, 2020

Hello,
This code returns an "Invalid Syntax" error.

`REPLACE_BY_SPACE_RE = re.compile('[/(){}[]|@,;]')
BAD_SYMBOLS_RE = re.compile('[^0-9a-z #+_]')
STOPWORDS = set(stopwords.words('english'))

def text_prepare(text):
"""
text: a string

    return: modified initial string
"""
text = # lowercase text
text = # replace REPLACE_BY_SPACE_RE symbols by space in text
text = # delete symbols which are in BAD_SYMBOLS_RE from text
text = # delete stopwords from text
return text`
@ashraf21c
Copy link
Author

The problem is in this specific line of code:

text = # lowercase text

@ashraf21c
Copy link
Author

I found the solution at course`s forum.
You have to uncomment it and type your answer.

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

No branches or pull requests

1 participant