Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Have you used spacy.io for comparison? The author seems to enjoy trolling about the faults of CoreNLP, but the license is very agreeable and the results seem on par.


I've looked at it, and played with a bit. I think when I last looked at it the licensing was even less friendly than CoreNLP. I believe this has been fixed though, so it's probably worth looking at again.

From memory when I was last looking around I cared mostly about named entity recognition (NER) and Spacy themselves say CoreNLP is better. CoreNLP has more features too.

WordVector integration in Spacy looks interesting though. That's probably enough to make me have a play with it.


I suggest Gensim for Word2Vec.

Spacy is really fast, the author is extremely knowledgeable, and it works well on the datasets it was trained on. Problem with SpaCy for me was that it was pre-trained on those texts and it was not possible to train it on new things. Also their parser wasn't very customizable.

This pre-trained model is borderline useless if you want to obtain good results on your data, which is probably very different from the data they trained on.

For NER in the Python world, the best option is pycrfsuite. It works really quickly and lets you easily define your own features. CRFSuite itself is a work of art. I only wish Okazaki incorporated 2nd order transitions because that makes a huge difference on some datasets.

CoreNLP is a lot worse than pyCRFsuite in terms of ease of integration and performance in my experience. Particularly, if you want to define your own features.


Your Word2Vec comments are interesting. I've had pretty good success with that original trained dataset the original Word2Vec implementation shipped with. That's a big dataset of course, but one of the strengths of the model is that if your training dataset is big enough you don't really need a lot of specialized training.

CRFSuite

I've never used this, but it's not really a ready-to-use NLP toolkit is it? Isn't it more a tool for building NLP tools with?


Gensim's implemention is better than the original and allows for Python API access to all the features. Highly recommended. Radim tends to write really memory efficient code unlike some other Python libs, so you can deal with large datasets.

If you want to do NER in a way that doesn't suck there is no way around making your own model on your own training data.

It honestly takes only a few days of labeling things yourself. I found that outsourcing the work to amazon turk is not a viable option because the graders there are terrible. And they work about 30x slower than you do. Even if you pay them $1/hr, that is like paying one person $30/hr. I'm not kidding.

Sure you can do a quick and dirty "send data to these guys and they'll do all the work", but I haven't come across a model that works well on all datasets. We're talking going from 30ish percent accuracy for a model not trained on your dataset to low 90s for something trained on your dataset. Of course, these are approximate numbers and it is definitely possible that your dataset is almost exactly like the ones they trained their model on.

It's incredibly simple to make your own model.

1. Label your data with brat: http://brat.nlplab.org/index.html # 5 days for 2k one page documents.

2. Tokenize data with nltk/spaCy. Come up with features and label using pycrfsuite: http://nbviewer.ipython.org/github/tpeng/python-crfsuite/blo... # 1 day

3. Do more labeling, retokenizing, neural embedding from word2vec's similar words to the tokens you have, tune parameters or come up with better features such as your own dictionaries of entities, etc. Retrain the model. #2 weeks.

4.Done. Now you have a memory efficient fast model tuned on your data. You can label anything you want. Not just Person/Company, but things like car vs bicycle brands, computer parts, obfuscated email addresses, etc.


I'd endorse pretty much all of this.

I want to make "domain adaptation as a service" the key part of spaCy's business model: you send us text, we send you a good model. Internally this will probably involve annotating part of the text, but that's a tactical decision we'll make.

I hope we can make some break-throughs that help NER be much more general than it is currently. But the current solution you describe works fine; it's just a pain in the ass for each organization to take on. We want to have the required infrastructure and expertise set up, and make the process seamless.


I think when I last looked at it the licensing was even less friendly than CoreNLP.

I has recently changed to MIT.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: