Skip to content

Instantly share code, notes, and snippets.

@Lysander6
Lysander6 / polish_sentence_nltk_tokenizer.py
Last active May 8, 2020 — forked from ksopyla/polish_sentence_nltk_tokenizer.py
A curated list of Polish abbreviations for NLTK sentence tokenizer based on Wikipedia text
View polish_sentence_nltk_tokenizer.py
import nltk
# interactive download
# nltk.download()
nltk.download('punkt')
extra_abbreviations = ['ps', 'inc', 'Corp', 'Ltd', 'Co', 'pkt', 'Dz.Ap', 'Jr', 'jr', 'sp', 'Sp', 'poj', 'pseud', 'krypt', 'sygn', 'Dz.U', 'ws', 'itd', 'np', 'sanskryt', 'nr', 'gł', 'Takht', 'tzw', 't.zw', 'ewan', 'tyt', 'oryg', 't.j', 'vs', 'l.mn', 'l.poj' ]
position_abbrev = ['Ks', 'Abp', 'abp','bp','dr', 'kard', 'mgr', 'prof', 'zwycz', 'hab', 'arch', 'arch.kraj', 'B.Sc', 'Ph.D', 'lek', 'med', 'n.med', 'bł', 'św', 'hr', 'dziek' ]
View keybase.md

Keybase proof

I hereby claim:

  • I am lysander6 on github.
  • I am lysander (https://keybase.io/lysander) on keybase.
  • I have a public key ASDow03OqTdKLrJ_mLbA-R-aVJcwXMIqBuZiP1B00oKqwwo

To claim this, I am signing this object:

@Lysander6
Lysander6 / path.m
Created May 12, 2016 — forked from randomsequence/path.m
Smooth CGPath from Array of Points
View path.m
// build a smooth CGPath from an array of CGPoints (stored as NSValues)
- (CGMutablePathRef)newPathFromPoints:(NSArray *)points {
CGMutablePathRef mutablePath = CGPathCreateMutable();
NSUInteger pointCount = [points count];
if (pointCount > 0) {
CGPoint p0 = [points[0] CGPointValue];