cltk: v0.1.28
Authors/Creators
- 1. Universidad de Buenos Aires
- 2. Archimedes Digital
- 3. Gitter
- 4. Columbia University
Description
Addition of information retrieval module for pattern matching in text.
From docsSeveral functions are available for querying text in order to match regular expression patterns. match_regex() is the most basic. Punctuation rules are included for texts using Latin sentence–final punctuation ('.', '!', '?') and Greek ('.', ';'). For returned strings, you may choose between a context of the match's sentence, paragraph, or custom number of characters on each side of a hit. Note that this function and the next each return a generator.
Here is an example in Latin with a sentence context, case-insensitive:
And here with context of 40 characters:
For querying the entirety of a corpus, see search_corpus(), which returns a tuple of ('author_name': 'match_context').
Files
cltk-v0.1.28.zip
Files
(414.8 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:37c0c02f50532246bfffcfd51ec9404d
|
414.8 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/kylepjohnson/cltk/tree/v0.1.28 (URL)