dd6d8307b494b349805095653298b89100412fb9,finetune/datasets/treebank_association.py,,,#,93

Before Change



if __name__ == "__main__":
    // Train and evaluate on SST
    X = []
    Y = []
    for i, a in enumerate(treebank.parsed_sents()[:30]):
        x, y = clean(find_noun_verb_pairs(a))
        X.append(x)
        Y.append(y)
    model = Association(possible_associations=["has_verb"], max_length=32, viable_edges={"noun_phrase": [["verb", "has_verb"], None], "verb": [None]})
    trainX, testX, trainY, testY = train_test_split(X, Y, test_size=0.3, random_state=42)
    model.fit(trainX, trainY)

After Change


if __name__ == "__main__":
    // Train and evaluate on SST
    data = TreebankNounVP()
    X, Y = data.get_data()
    model = Association(possible_associations=["has_verb"], max_length=32,
                        viable_edges={"noun_phrase": [["verb", "has_verb"], None], "verb": [None]})
    trainX, testX, trainY, testY = train_test_split(X, Y, test_size=0.3, random_state=42)
    model.fit(trainX, trainY)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: dd6d8307b494b349805095653298b89100412fb9
Time: 2019-01-14
Author: benlt@hotmail.co.uk
File Name: finetune/datasets/treebank_association.py
Class Name:
Method Name:


Project Name: nilearn/nilearn
Commit Name: e2bf248a400175ac1a153cdba62147e9162a710f
Time: 2019-04-17
Author: gkiar07@gmail.com
File Name: nilearn/image/resampling.py
Class Name:
Method Name: resample_img


Project Name: dPys/PyNets
Commit Name: d64b3e882f106f19ea02a5a6066e60a9c0616c5b
Time: 2019-08-24
Author: dpisner@utexas.edu
File Name: pynets/core/utils.py
Class Name:
Method Name: make_gtab_and_bmask