English documentation¶
This section has four parts. Which one you want depends on what you are trying to do right now.
| What you want | Where to go |
|---|---|
| I have never used this, walk me through it | Tutorial |
| I need to get a specific job done | How-to |
| I am looking up what a feature is | Reference |
| I want to understand why it works this way | Explanation |
| I want to start from a working script | Example scripts (ten scripts, each answering one question; comments in Turkish) |
If you are not sure, start with the tutorial: it takes you from installation to your first table.
At a glance¶
import turkish_linguistic_features as tlf
oz = tlf.analyze("Colorless green ideas sleep furiously.", lang="en")
len(oz) # 181
oz["word_len_mean"] # 6.6
The library has eleven public names. That is all of them:
| Name | What it does |
|---|---|
analyze |
Extracts every feature from one text |
analyze_corpus |
Runs analyze on every text in a folder |
ngram_matches |
Shows what a sequence of words or POS tags you give (such as ["ADJ", "NOUN"]) matched in a text, with counts |
segment_text |
Splits a text into fixed-size segments |
save_csv |
Writes the resulting rows to CSV |
describe_feature |
Gives a feature's definition, formula, scale, the minimum data it needs, and its citation |
FeatureParams |
The settings object holding thresholds and windows |
LinguisticFeaturesError |
Base class for the library's own errors |
ModelNotFoundError |
Raised when required language data is missing: a spaCy model, or NLTK's cmudict for English syllable counts |
MissingDependencyWarning |
Warned when an optional package is missing |
ParagraphStructureWarning |
Warned when a text over 1000 words has no paragraph boundary |
Every feature, including the phrases you count with custom_ngrams, comes out
of analyze.
Terms¶
The documentation uses fixed terminology. If a word is unclear: glossary.