5d4a480c48a242c1d8051be502ecb98a9b273e9c,tests/candidates/test_candidates.py,,test_ngram_split,#Any#,33

Before Change


    corpus_parser.apply(doc_preprocessor, parallelism=PARALLEL)
    assert session.query(Document).count() == max_docs
    assert session.query(Sentence).count() == 828
    sents = session.query(Sentence).all()
    // Doesn"t matter which sentence we grab, since we are overwriting the
    // relevant attribs
    sent = sents[0]
    sent.text = "New-Text"
    sent.words = ["New-Text"]
    sent.char_offsets = [0]
    sent.abs_char_offsets = [0]

After Change


    // When a text ends with a split_token.
    sent.text = "New-"
    sent.words = ["New-"]
    result = list(ngrams.apply(sent))

    assert len(result) == 2
    assert result[0].get_span() == "New-"
    assert result[1].get_span() == "New"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: HazyResearch/fonduer
Commit Name: 5d4a480c48a242c1d8051be502ecb98a9b273e9c
Time: 2018-08-21
Author: hiromu.hota@hal.hitachi.com
File Name: tests/candidates/test_candidates.py
Class Name:
Method Name: test_ngram_split


Project Name: home-assistant/home-assistant
Commit Name: 61909e873f894591419ef25015df8360650886c3
Time: 2017-02-26
Author: paulus@paulusschoutsen.nl
File Name: tests/components/recorder/test_init.py
Class Name: TestRecorder
Method Name: test_saving_state


Project Name: HazyResearch/fonduer
Commit Name: 766a673bf6bce5b6e238856aaae5f928687e9340
Time: 2018-02-07
Author: lwhsiao@stanford.edu
File Name: tests/test_parser.py
Class Name:
Method Name: test_parse_structure