Giter VIP home page Giter VIP logo

Comments (4)

llStringll avatar llStringll commented on August 17, 2024

Your scripts are very hardcoded for data processing, one needs to change each and every processor for a differently structured data, or force-structure own data to the script

from pet.

llStringll avatar llStringll commented on August 17, 2024

Can you please specify the format of MNLI dataset that you used, based on which you wrote your preprocessors in tasks.py

from pet.

timoschick avatar timoschick commented on August 17, 2024

Hi there,

Your scripts are very hardcoded for data processing, one needs to change each and every processor for a differently structured data, or force-structure own data to the script

We did not design the task processors as "general purpose" solutions for different kinds of tasks/formats. Instead, they are supposed to provide a simple interface for implementing your own logic for your own data formats (as shown in this example): All you need to do is to define the get_train_examples, get_dev_examples, get_test_examples, get_unlabeled_examples and get_labels methods, where the first four are supposed to return a list of InputExamples (as defined here) and the last one returns a list of string labels.

The MNLI dataset that we used for our task processor is a tab-separated file with the keys (in that order) index, promptID, pairID, genre, sentence1_binary_parse, sentence2_binary_parse, sentence1_parse, sentence2_parse, sentence1, sentence2, label1, ..., labeln, gold_label. However, the only information that we actually make use of in the task processor (see here) are the columns 0 (index), 8 (sentence1), 9 (sentence2) and -1 (gold_label).

For example, the first two lines of the dev (matched) set are:

index	promptID	pairID	genre	sentence1_binary_parse	sentence2_binary_parse	sentence1_parse	sentence2_parse	sentence1	sentence2	label1	label2	label3	label4	label5	gold_label
0	63735	63735n	slate	( ( The ( new rights ) ) ( are ( nice enough ) ) )	( Everyone ( really ( likes ( the ( newest benefits ) ) ) ) )	(ROOT (S (NP (DT The) (JJ new) (NNS rights)) (VP (VBP are) (ADJP (JJ nice) (RB enough)))))	(ROOT (S (NP (NN Everyone)) (VP (ADVP (RB really)) (VBZ likes) (NP (DT the) (JJS newest) (NNS benefits)))))	The new rights are nice enough	Everyone really likes the newest benefits 	neutral	entailment	neutral	neutral	neutral	neutral

You can either modify your own files to match that format or simply implement your own task processor that works with your input format. Let me know if you need any further help for that!

from pet.

llStringll avatar llStringll commented on August 17, 2024

Yes, thank you for the detailed answer,
Cheers.

from pet.

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.