8a9344ead3be54cf1d427b30888e0e84ffe4d20a,hypertools/tools/text2mat.py,,text2mat,#,11

Before Change


    ttype = check_type(text)

    // vector models
    vectorizer_models = {
        "CountVectorizer" : CountVectorizer,
        "TfidfVectorizer" : TfidfVectorizer
    }

    // text models
    texts = {
        "LatentDirichletAllocation" : LatentDirichletAllocation,
        "NMF" : NMF
    }

    // support user defined vectorizer model
    if vtype in ("class", "class_instance"):
        if hasattr(vectorizer, "fit_transform"):

After Change


        data = [data]

    // get data types
    dtypes = list(map(check_dtype, data))

    // if all data are vectorizer objects and have the same vocab, skip vectorizing
    if all([dtype is "vecobj" for dtype in dtypes]):
        if all_vocabs_same(data):
            vectorizer=None
            warnings.warn("Skipping vectorization step. Vectorizer objects "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: ContextLab/hypertools
Commit Name: 8a9344ead3be54cf1d427b30888e0e84ffe4d20a
Time: 2018-01-22
Author: andrew.heusser@gmail.com
File Name: hypertools/tools/text2mat.py
Class Name:
Method Name: text2mat


Project Name: ContextLab/hypertools
Commit Name: 8a9344ead3be54cf1d427b30888e0e84ffe4d20a
Time: 2018-01-22
Author: andrew.heusser@gmail.com
File Name: hypertools/tools/text2mat.py
Class Name:
Method Name: text2mat


Project Name: WheatonCS/Lexos
Commit Name: 1a8e10d0a88e25aa8b3ca9d7ea31225439d348a7
Time: 2017-08-07
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_para_to_group


Project Name: WheatonCS/Lexos
Commit Name: d3fd161765b9c9652fab403bcc59fcbc8e40cfe9
Time: 2017-08-07
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_group_to_group