Giter VIP home page Giter VIP logo

Comments (3)

rknaebel avatar rknaebel commented on August 18, 2024

You cannot, unfortunately, select individual components of a stored pipeline easily. However, you could adjust the config.json file of the corresponding model to include only the connective component (just remove the other entries that follow).

For data preparation, I recommend using discopy-data in combination with the parser as follows (I guess the interface changed over the last days):

  1. traditional feature-based parser: discopy-tokenize -i examples/wsj_0336 | discopy-add-parses -c | discopy-parse lin models/lin
  2. neural parser: discopy-tokenize --tokenize-only -i examples/wsj_0336 | discopy-nn-parse bert-base-cased models/pipeline-bert-2

You could also first process your documents, store them in a single file and then parse this file by either parser pipeline:

  1. discopy-tokenize -i examples/wsj_0336 | discopy-add-parses -c > dataset.json
  2. discopy-tokenize -i examples/wsj_034X | discopy-add-parses -c >> dataset.json
  3. discopy-nn-parse bert-base-cased models/pipeline-bert-2 -i dataset.json

Note: discopy-tokenize splits text files into multiple documents by three or more consecutive newlines (r'\n\n\n+')

from discopy.

anamm1025 avatar anamm1025 commented on August 18, 2024

You cannot, unfortunately, select individual components of a stored pipeline easily. However, you could adjust the config.json file of the corresponding model to include only the connective component (just remove the other entries that follow).

For data preparation, I recommend using discopy-data in combination with the parser as follows (I guess the interface changed over the last days):

  1. traditional feature-based parser: discopy-tokenize -i examples/wsj_0336 | discopy-add-parses -c | discopy-parse lin models/lin
  2. neural parser: discopy-tokenize --tokenize-only -i examples/wsj_0336 | discopy-nn-parse bert-base-cased models/pipeline-bert-2

You could also first process your documents, store them in a single file and then parse this file by either parser pipeline:

  1. discopy-tokenize -i examples/wsj_0336 | discopy-add-parses -c > dataset.json
  2. discopy-tokenize -i examples/wsj_034X | discopy-add-parses -c >> dataset.json
  3. discopy-nn-parse bert-base-cased models/pipeline-bert-2 -i dataset.json

Note: discopy-tokenize splits text files into multiple documents by three or more consecutive newlines (r'\n\n\n+')

Thanks for your response. I have been able to run first two steps successfully. However, this repository doesn't contain 'models' folder, as well as config files. Can you please upload those too?

from discopy.

rknaebel avatar rknaebel commented on August 18, 2024

To not blow up the repository with models' histories, I put them under releases:
https://github.com/rknaebel/discopy/releases

from discopy.

Related Issues (19)

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.