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

Prediction of multiple lines from a text document #18

Open
prakashwarbler opened this issue Feb 26, 2020 · 1 comment
Open

Prediction of multiple lines from a text document #18

prakashwarbler opened this issue Feb 26, 2020 · 1 comment

Comments

@prakashwarbler
Copy link

is there any possibility to do prediction on text documents?
because when i tried for loop to read line by line and pass into the p.predict() its not running ?
what is the issue. how to do prediction for multiple lines ?

@abneetwats24
Copy link

Process multi line to convert it into string following code might help:

fo = open("file.txt", "r")
text = (fo.read())..encode("ascii", errors="ignore").decode()

p = Parser()

p.load_models("/path to model/")

p.predict(text)

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

2 participants