language_tool_python
language_tool_python copied to clipboard
How to perform collective analysis of sentences from a script (e.g. movie or play)?
Hi!
Before opting for premium account of language tool ...I wish to evaluate it's performance on various sentences as mentioned below:
All the sentences as a whole belongs to ....say a conversation or a story, collectively ....as most of my work is similar to such a case...how can I use the tool effectively (within API limits)..for example.
Sentence 1: Bill: Where did Jack went? Sentence 2: Martha replied that he go to see his wife.
So, per sentence analysis (tool works great in such a case) will correct Sentence 1 & 2
Sentence 1: Bill: Where did Jack go? Sentence 2: Martha replied that he went to see his wife.
But collectively both the sentences ideally should be:
Bill: Where did Jack go? Martha: He went to see his wife.
As, sentence 2 is the part of the conversation, can the tool make such minor adjustments? Or the majors ones if we consider a different example with more deviance in many sentences? I hope you got my point.
@ls-milkyway I don't think LanguageTool (free or premium) can do this kind of task. Is it something that could be solved with regular expressions/a list of rules?
@ls-milkyway I don't think LanguageTool (free or premium) can do this kind of task. Is it something that could be solved with regular expressions/a list of rules?
Thanks! for clarifying. Any existing python code or Github project which can help me to add regular expressions or the list of rules?
Don't you think that this should be included in the tool or the python wrapper? As it will certainly make it easy for full-time writers, authors etc. who will use the language tool for the analysis of the sentences mostly related to each other.
@ls-milkyway I don't think I really understand your use case. Are you trying to grammar-check a text file that represents a script (i.e. of a movie, play, or TV show)? Or are you trying to transform the text in some way?
@ls-milkyway I don't think I really understand your use case. Are you trying to grammar-check a text file that represents a script (i.e. of a movie, play, or TV show)? Or are you trying to transform the text in some way?
Yep, you can assume this is correct & related to my case: Are you trying to grammar-check a text file that represents a script (i.e. of a movie, play, or TV show)?
Ah, I see. Then I would use regular expressions to extract only the lines themselves, and exclusively grammar-check those.