Parsing sentences from text, HTML or URL.
pip install sentenceparser
Parse sentences from text file using CLI:
sentenceparser from-text ~/Documents/text.txt
Parse sentences from HTML file using CLI:
sentenceparser from-html ~/Documents/site.html
Parse sentences from URL using CLI:
sentenceparser from-url 'https://example.com/'
Parse sentences from URL using CLI and add line numbers for each sentence:
sentenceparser from-url 'https://example.com/' --line-number
Parse sentences from text file using Python API:
import sentenceparser
text = 'Lorem ipsum dolor sit amet consectetur adipisicing elit...'
for sentence in sentenceparser.from_text(text):
print(sentence)
Parse sentences from HTML file using Python API:
import sentenceparser
html = '<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p><p>...'
for sentence in sentenceparser.from_html(html):
print(sentence)
Parse sentences from URL using Python API:
import sentenceparser
for sentence in sentenceparser.from_url('https://example.com/'):
print(sentence)
Pull:
git pull [email protected]:2tunnels/sentenceparser.git
Install:
pipenv install --dev
Test:
pytest