834340875d6baae452eaf527443025c356a621d2,mordecai/geoparse.py,Geoparse,geoparse,#Geoparse#Any#Any#,813

Before Change


            doc = nlp(doc)
        proced = self.doc_to_guess(doc)
        if not proced:
            print("Nothing came back from doc_to_guess...")
        for loc in proced:
            if loc["country_conf"] >= self.country_threshold: // shrug
                res = self.query_geonames_country(loc["word"], loc["country_predicted"])
            elif loc["country_conf"] < self.country_threshold:

After Change



            // Pick the best place
            X, meta = self.features_for_rank(loc, res)
            all_tasks, sorted_meta, sorted_X = self.format_for_prodigy(X, meta, loc["word"], return_feature_subset=True)
            fl_pad = np.pad(sorted_X, ((0, 4 - sorted_X.shape[0]), (0, 0)), "constant")
            fl_unwrap = fl_pad.flatten()
            prediction = self.rank_model.predict(np.asmatrix(fl_unwrap))
            place_confidence = prediction.max()
            loc["geo"] = sorted_meta[prediction.argmax()]
            loc["place_confidence"] = place_confidence


        if not verbose:
            proced = self.clean_proced(proced)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: openeventdata/mordecai
Commit Name: 834340875d6baae452eaf527443025c356a621d2
Time: 2017-11-19
Author: ahalterman0@gmail.com
File Name: mordecai/geoparse.py
Class Name: Geoparse
Method Name: geoparse


Project Name: shenweichen/DeepCTR
Commit Name: bd5dc215e1c21bf12e6b5297d10f293c45e16c77
Time: 2019-01-02
Author: wcshen1994@163.com
File Name: examples/run_classification_criteo.py
Class Name:
Method Name:


Project Name: shenweichen/DeepCTR
Commit Name: bd5dc215e1c21bf12e6b5297d10f293c45e16c77
Time: 2019-01-02
Author: wcshen1994@163.com
File Name: examples/run_regression_movielens.py
Class Name:
Method Name: