Locked History Actions

Diff for "Segment"

Differences between revisions 21 and 22
Revision 21 as of 2013-05-13 16:25:18
Size: 1577
Comment: update link
Revision 22 as of 2016-01-18 18:56:23
Size: 1560
Comment: update links
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
'''Homepage:''' http://sourceforge.net/projects/segment/ '''Homepage:''' https://github.com/loomchild/segment
Line 31: Line 31:
 * SRX rules file for sentence splitting in Polish, written by Marcin Miłkowski: http://sourceforge.net/p/languagetool/code/HEAD/tree/trunk/languagetool/languagetool-core/src/main/resources/org/languagetool/resource/segment.srx?format=raw.  * SRX rules file for sentence splitting in Polish, written by Marcin Miłkowski: https://raw.githubusercontent.com/languagetool-org/languagetool/master/languagetool-core/src/main/resources/org/languagetool/resource/segment.srx

Segment

Segment program is used to split text into segments (sentences, paragraphs, words). Split rules are read from file in XML based Segmentation Rules Exchange (SRX) standard format. Can be used as a programming library.
Homepage: https://github.com/loomchild/segment

Documentation

For detailed info see the docs directory in the Segment package file.

Using as sentence splitter for Polish

In segment main directory:

./bin/segment -l pl -s segment.srx

This way the program will read text from stdin and write sentences to stdout - each one in separate line.

Note: the SRX file can deal with text that contains paragraphs separated with two line breaks, and where a single line break is still inside the paragraph (which is also the default TeX mode). To have such behavior, use:

./bin/segment -l pl_two -s segment.srx

Adding an end-of-sentence marker on a single line break is achieved this way:

./bin/segment -l pl_one -s segment.srx