mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Add Tokenwiser to Projects (#7541)
* Add tokenwiser * Update universe.json
This commit is contained in:
parent
59c2069eb1
commit
8b3eec6e62
|
@ -231,6 +231,49 @@
|
||||||
"website": "https://koaning.io"
|
"website": "https://koaning.io"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "tokenwiser",
|
||||||
|
"title": "tokenwiser",
|
||||||
|
"slogan": "Connect vowpal-wabbit & scikit-learn models to spaCy to run simple classification benchmarks. Comes with many utility functions for spaCy pipelines.",
|
||||||
|
"github": "koaning/tokenwiser",
|
||||||
|
"pip": "tokenwiser",
|
||||||
|
"thumb": "https://koaning.github.io/tokenwiser/token.png",
|
||||||
|
"image": "https://koaning.github.io/tokenwiser/logo-tokw.png",
|
||||||
|
"code_example": [
|
||||||
|
"import spacy",
|
||||||
|
"",
|
||||||
|
"from sklearn.pipeline import make_pipeline",
|
||||||
|
"from sklearn.feature_extraction.text import CountVectorizer",
|
||||||
|
"from sklearn.linear_model import LogisticRegression",
|
||||||
|
"",
|
||||||
|
"from tokenwiser.component import attach_sklearn_categoriser",
|
||||||
|
"",
|
||||||
|
"X = [",
|
||||||
|
" 'i really like this post',",
|
||||||
|
" 'thanks for that comment',",
|
||||||
|
" 'i enjoy this friendly forum',",
|
||||||
|
" 'this is a bad post',",
|
||||||
|
" 'i dislike this article',",
|
||||||
|
" 'this is not well written'",
|
||||||
|
"]",
|
||||||
|
"",
|
||||||
|
"y = ['pos', 'pos', 'pos', 'neg', 'neg', 'neg']",
|
||||||
|
"",
|
||||||
|
"# Note that we're training a pipeline here via a single-batch `.fit()` method",
|
||||||
|
"pipe = make_pipeline(CountVectorizer(), LogisticRegression()).fit(X, y)",
|
||||||
|
"",
|
||||||
|
"nlp = spacy.load('en_core_web_sm')",
|
||||||
|
"# This is where we attach our pre-trained model as a pipeline step.",
|
||||||
|
"attach_sklearn_categoriser(nlp, pipe_name='silly_sentiment', estimator=pipe)"
|
||||||
|
],
|
||||||
|
"category": ["pipeline", "training"],
|
||||||
|
"author": "Vincent D. Warmerdam",
|
||||||
|
"author_links": {
|
||||||
|
"twitter": "fishnets88",
|
||||||
|
"github": "koaning",
|
||||||
|
"website": "https://koaning.io"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "spacy-stanza",
|
"id": "spacy-stanza",
|
||||||
"title": "spacy-stanza",
|
"title": "spacy-stanza",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user