Moe Chizari

Projects

The write-up

Interactive demo, added

NLP Tools Comparison: SpaCy vs. NLTK: try it.

Two tokenizing rules side by side on your own text, with the places they differ marked. The rules illustrate the kind of difference the write-up compares; they are not spaCy or NLTK.

Try it

Move the controls; the chart and the sentence under it update.

Rule A: 53 tokens

Splits at every space and every punctuation mark.

Dr.Kim'sstate-of-the-artmodeldidn'tbeatthe3.5%baseline.SeetheU.S.resultsathttps://example.com/nlp-reportoremailnlp-team@example.org.

Rule B: 21 tokens

Keeps web and email addresses, numbers like 3.5, contractions, hyphenated words and abbreviations whole.

Dr.Kim'sstate-of-the-artmodeldidn'tbeatthe3.5%baseline.SeetheU.S.resultsathttps://example.com/nlp-reportoremailnlp-team@example.org.

Outlined: this rule cuts that part of the text differently from the other rule

Rule A finds 53 tokens and Rule B finds 21. They cut 8 parts of the text differently: “Dr.”, “Kim's”, “state-of-the-art”, “didn't”, “3.5”, “U.S.”, “https://example.com/nlp-report”, “nlp-team@example.org”.

The two rules are written for this page and run in your browser. They only illustrate the kind of tokenizing differences the write-up compares; they are not what spaCy or NLTK return.

The write-up this goes with: NLP Tools Comparison: SpaCy vs. NLTK.

All demos