Giter VIP home page Giter VIP logo

Comments (9)

kmike avatar kmike commented on July 21, 2024

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.

tpeng avatar tpeng commented on July 21, 2024

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.

kmike avatar kmike commented on July 21, 2024

If I train a model locally and then upload it to the server it doesn't work - this is the issue.

from webstruct.

shreyaskarnik avatar shreyaskarnik commented on July 21, 2024

+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.

kmike avatar kmike commented on July 21, 2024

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.

kmike avatar kmike commented on July 21, 2024

To make it work don't pass model_filename argument explicitly.

from webstruct.

shreyaskarnik avatar shreyaskarnik commented on July 21, 2024

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.

shreyaskarnik avatar shreyaskarnik commented on July 21, 2024

It works! Thanks @kmike

from webstruct.

kmike avatar kmike commented on July 21, 2024

Thanks for poking :) Let's close this ticket.

from webstruct.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.