Comments (9)
I'm using the following hack for loading NER classes:
def load_webstruct_model(path):
model = joblib.load(path)
# fix model filename path
crf = model.steps[-1][1]
folder = os.path.dirname(path)
crf.model_filename = os.path.join(folder, crf.model_filename)
if not os.path.exists(crf.model_filename):
raise Exception("%s must exist" % crf.model_filename)
return model
from webstruct.
why move the wapiti model to another place? maybe we should raise a exception earlier if the wapiti model is not there or check the checksum in _load_model
?
from webstruct.
If I train a model locally and then upload it to the server it doesn't work - this is the issue.
from webstruct.
+1 got hit by it a couple of days ago, I have a workaround but it will be nice to see this merged. 👍
from webstruct.
Hi @shreyu86 - do you use latest webstruct? The referenced commit is already merged. Models based on CRFsuite don't have this issue, and it should also work fine now with Wapiti-based models if I'm not mistaken. I wonder why haven't I closed this ticket..
from webstruct.
To make it work don't pass model_filename
argument explicitly.
from webstruct.
Ah I see, I am using latest webstruct I use wapiti with model_filename
I will check and let you guys know. Thanks!
from webstruct.
It works! Thanks @kmike
from webstruct.
Thanks for poking :) Let's close this ticket.
from webstruct.
Related Issues (20)
- Default text tokenizer is slow HOT 6
- bio_classification_report is broken with scikit-learn master
- to_webannotator may fail if an attribute value of some HTML element contains a control character
- add DIRECTIONS entity to the tag set and annotate the data
- Get rid of scikit-learn dependencies HOT 1
- One good example beginning to end HOT 2
- Document tokenizers
- `load_trees()` raises exception HOT 2
- Python 3 support HOT 2
- Update tutorial using python-crfsuite
- don't use conda on travis
- Pretrained Models HOT 4
- Tutorial results in obscure errors. HOT 3
- add element's relative position feature of its parent
- Not possible to annotate <button>, <option> etc. elements
- Very slow in some cases
- Is Webannotator extension still available to annotate data?
- update README to match refactored code
- Parsing Dates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webstruct.