Python - Check if text is sentences? So I have a scraper that gets articles. However, it doesn't always work properly. I want to get better at checking when it doesn't work. For example, the following is something like I want it to scrape: 


  Hello. This is a sequence of sentences that are put together. They don't have to follow this exact format, but something very close to this would be nice! Just basically stuff like this put together with the occasional weird formatting, which depends on what is scraped. 


But I might also get something that is obviously not text: 


  REGISTER | LOGIN | LOGOUT | Sign in to your account Forgot your password?  {* #signInForm *}.... 


Is there any python library that checks the general format of strings? Basically, I am scraping articles and want to see if the text scraped is article-y. If there isn't a python library, would the best way to go be some sort of regex matching? Is this possible to do reasonably well? 

Any help would be greatly appreciated, thanks!!
I would try a semi-supervised learning technique where it passes you scraps and asks you to label them. What you're looking for will likely be kind of domain specific depending on the type of site. In the end you'll probably have a bunch of heuristics like:


If length &lt; 50 and contains "LOGOUT", "REGISTER","SIGN IN","LOGIN"
If count of "|" > 1
If count of all upper case words > 1