Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Parsing sentences from text, HTML or URL.

Project description

sentenceparser

Parsing sentences from text, HTML or URL.

Install

pip install sentenceparser

Usage

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)

Development

Pull:

git pull git@github.com:2tunnels/sentenceparser.git

Install:

pipenv install --dev

Test:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sentenceparser, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size sentenceparser-0.0.3-py3-none-any.whl (3.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size sentenceparser-0.0.3.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page