GithubHelp home page GithubHelp logo

sgrvinod / a-pytorch-tutorial-to-sequence-labeling Goto Github PK

View Code? Open in Web Editor NEW
362.0 14.0 82.0 6.5 MB

Empower Sequence Labeling with Task-Aware Neural Language Model | a PyTorch Tutorial to Sequence Labeling

License: MIT License

Python 100.00%
sequence-labeling sequence-tagger nlp pytorch pytorch-tutorial co-training crf conditional-random-fields language-model entity-extraction

a-pytorch-tutorial-to-sequence-labeling's Issues

Pretrained model does not have all tags

Thank you for the tutorial, it is very easy to follow.
However, I am unable to replicate the results as mentioned in the tutorial.
I attempted to use the checkpoint for pertained model. The tag_map seems to not include all the tags. Is this on a different dataset?

the dimension of cmap_lengths

in models.py line 184
:param cmap_lengths: character sequence lengths, a tensor of dimensions (batch_size, word_pad_len)
the shape of cmap_lengths should be (batch_size)?

Prediction

Thanks for your code.
Could you please add a section for prediction using the trained weights ?

TypeError: an integer is required (got type str)

Getting the following error. Did someone face the same?

Embedding length is 100.
You have elected to include embeddings that are out-of-corpus.

Loading embeddings...
Traceback (most recent call last):
  File "train.py", line 356, in <module>
    main()
  File "train.py", line 79, in main
    expand_vocab)  # load pre-trained embeddings
  File "C:\Users\user\Desktop\NLP\a-PyTorch-Tutorial-to-Sequence-Labeling-master\utils.py", line 230, in load_embeddings
    for line in open(emb_file, 'r', 'utf-8'):
TypeError: an integer is required (got type str)

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.