No project description provided
Project description
cutters - python
A rule based sentence segmentation library.
🚧 This library is experimental. 🚧
Example
After installing the cutters
package with pip
, usage is simple (note that the language is defined via ISO 639-1 two letter language codes).
import cutters
text = """
Petar Krešimir IV. je vladao od 1058. do 1074. St. Louis 9LX je događaj u svijetu šaha. To je prof.dr.sc. Ivan Horvat. Volim rock, punk, funk, pop itd. Tolstoj je napisao: "Sve sretne obitelji nalik su jedna na drugu. Svaka nesretna obitelj nesretna je na svoj način."
""";
sentences = cutters.cut(text, "hr");
print(sentences);
This results in the following output (note that the str
struct fields are &str
).
[Sentence {
str: "Petar Krešimir IV. je vladao od 1058. do 1074. ",
quotes: [],
}, Sentence {
str: "St. Louis 9LX je događaj u svijetu šaha.",
quotes: [],
}, Sentence {
str: "To je prof.dr.sc. Ivan Horvat.",
quotes: [],
}, Sentence {
str: "Volim rock, punk, funk, pop itd.",
quotes: [],
}, Sentence {
str: "Tolstoj je napisao: \"Sve sretne obitelji nalik su jedna na drugu. Svaka nesretna obitelj nesretna je na svoj način.\"",
quotes: [
Quote {
str: "Sve sretne obitelji nalik su jedna na drugu. Svaka nesretna obitelj nesretna je na svoj način.",
sentences: [
"Sve sretne obitelji nalik su jedna na drugu.",
"Svaka nesretna obitelj nesretna je na svoj način.",
],
},
],
}]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cutters-0.1.0.tar.gz
(9.6 kB
view hashes)
Built Distributions
Close
Hashes for cutters-0.1.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41ff1984ba01c197b0f9caa20479ff82c3e2d4bec0cafa6517fbaba173a573f3 |
|
MD5 | 56ac3927d26533bbc6392b4abec17212 |
|
BLAKE2b-256 | f23f40618ba59a38bbaf54c27a8c1fd4c9e7e6c41a0cbde825b345fb9d165280 |
Close
Hashes for cutters-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ab6e02286be6e2636fc50e345ca1d8faa0c28647693e76707ab9222190a9193 |
|
MD5 | e99ddd75596c81a9eca2adaba0616206 |
|
BLAKE2b-256 | 341796477e6a0143eccf840eaa4e4e8348fbc05bc472f141e7f30d7cce330a8c |
Close
Hashes for cutters-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 291ce465055d65975415fd26d54b105f70e4926b2afcb2f1883a3599ca5407f5 |
|
MD5 | 63cdcbb02df9915cea34c60beffd7091 |
|
BLAKE2b-256 | dff3b36e081a31e5c74bca06be9ec743a2901758292bed22497ccdf06f859eca |
Close
Hashes for cutters-0.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20dac9e272a9eac90599f14b5e1d69d19efa92e3ba9b3028dbe97bfc1c5d698d |
|
MD5 | a6208172b99175fdf12f4748be0c11f5 |
|
BLAKE2b-256 | d1a5886653fe778ecad33beea0294d70d03ae64f40092a77891c40afe81c0c7e |
Close
Hashes for cutters-0.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | adcba5f7e27289719a012803414fc16e773f2f9609141ada18f555354b6f51ab |
|
MD5 | a04c6571de72e022a67125eb4abb8444 |
|
BLAKE2b-256 | ccad59773e1d209f63664acd8d14e402ef72a2de0d07883eb29ba9432c500802 |
Close
Hashes for cutters-0.1.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8a35e040b1462afe1f2c586b146af99906167b320be202a830bb02a9a0c6b74 |
|
MD5 | 965c0043eee08c34db2e4a38ae5c496f |
|
BLAKE2b-256 | 400857c97ffd9a40022bcaff8ec86ab0e1b2cc648b36898783b49bc406d10e05 |