b367690eebc97a2fea3da1c1694ba365c72fd713,jieba/__init__.py,,add_word,#Any#Any#Any#,334

Before Change


def add_word(word, freq, tag=None):
    global FREQ, trie, total, user_word_tag_tab
    freq = float(freq)
    FREQ[word] = log(freq / total)
    if tag is not None:
        user_word_tag_tab[word] = tag.strip()
    p = trie
    for c in word:

After Change


    FREQ[word] = log(float(freq) / total)
    if tag is not None:
        user_word_tag_tab[word] = tag.strip()
    for ch in range(len(word)):
        pfdict.add(word[:ch+1])

__ref_cut = cut
__ref_cut_for_search = cut_for_search

def __lcut(sentence):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: fxsjy/jieba
Commit Name: b367690eebc97a2fea3da1c1694ba365c72fd713
Time: 2014-10-18
Author: abcdoyle888@gmail.com
File Name: jieba/__init__.py
Class Name:
Method Name: add_word


Project Name: geomstats/geomstats
Commit Name: be291b6a6ab8a663beac72fefa213bc7216a1617
Time: 2020-04-07
Author: hadizaatiti@gmail.com
File Name: geomstats/learning/frechet_mean.py
Class Name:
Method Name: _ball_gradient_descent


Project Name: hpclab/rankeval
Commit Name: 8d4fee5d7dc69f82aadb38abc4564dda5cc8580f
Time: 2017-06-14
Author: cristina.i.muntean@gmail.com
File Name: rankeval/core/metrics/dcg.py
Class Name: DCG
Method Name: eval_per_query