47f7c23231036c8981d72ae11da9df5a7712a281,textacy/extract.py,,ngrams,#,82

Before Change


            ngram for ngram in ngrams_ if all(w.pos_ in include_pos for w in ngram)
        )
    if exclude_pos:
        exclude_pos = {pos.upper() for pos in utils.to_collection(exclude_pos, str, set)}
        ngrams_ = (
            ngram
            for ngram in ngrams_

After Change


    if filter_nums is True:
        ngrams_ = (ngram for ngram in ngrams_ if not any(w.like_num for w in ngram))
    if include_pos:
        include_pos = cast(Set[str], utils.to_collection(include_pos, str, set))
        include_pos = {pos.upper() for pos in include_pos}
        ngrams_ = (
            ngram for ngram in ngrams_ if all(w.pos_ in include_pos for w in ngram)
        )
    if exclude_pos:
        exclude_pos = cast(Set[str], utils.to_collection(exclude_pos, str, set))
        exclude_pos = {pos.upper() for pos in exclude_pos}
        ngrams_ = (
            ngram
            for ngram in ngrams_
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: chartbeat-labs/textacy
Commit Name: 47f7c23231036c8981d72ae11da9df5a7712a281
Time: 2020-03-01
Author: burtdewilde@gmail.com
File Name: textacy/extract.py
Class Name:
Method Name: ngrams


Project Name: chartbeat-labs/textacy
Commit Name: e12ab1ee4532a02a73abf07f2a22c3d4f1e4e0d7
Time: 2020-03-01
Author: burtdewilde@gmail.com
File Name: textacy/ke/yake.py
Class Name:
Method Name: yake


Project Name: chartbeat-labs/textacy
Commit Name: 47f7c23231036c8981d72ae11da9df5a7712a281
Time: 2020-03-01
Author: burtdewilde@gmail.com
File Name: textacy/extract.py
Class Name:
Method Name: ngrams


Project Name: chartbeat-labs/textacy
Commit Name: 47f7c23231036c8981d72ae11da9df5a7712a281
Time: 2020-03-01
Author: burtdewilde@gmail.com
File Name: textacy/extract.py
Class Name:
Method Name: words