c4537a1a3f223b5129862ae41f1fa955fc6acff9,pymorphy2/tagset.py,OpencorporaTag,_init_restrictions,#Any#Any#,121

Before Change


        gr = dict(dict_grammemes)
        children = collections.defaultdict(set)

        for index, (name, parent) in enumerate(dict_grammemes):
            if parent:
                children[parent].add(name)
            if gr.get(parent, None): // parent"s parent
                children[gr[parent]].add(name)

        // expand EXTRA_INCOMPATIBLE
        for grammeme, g_set in cls.EXTRA_INCOMPATIBLE.items():
            for g in g_set.copy():
                g_set.update(children[g])

After Change


        cls._init_alias_map(dict_grammemes)
        super(OpencorporaTag, cls)._init_restrictions(dict_grammemes)

        GRAMMEME_INDICES = collections.defaultdict(lambda: 0)
        for name, idx in cls.GRAMMEME_INDICES.items():
            GRAMMEME_INDICES[cls._from_internal_grammeme(name)] = idx
        cls.GRAMMEME_INDICES = GRAMMEME_INDICES
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: kmike/pymorphy2
Commit Name: c4537a1a3f223b5129862ae41f1fa955fc6acff9
Time: 2012-11-23
Author: kmike84@gmail.com
File Name: pymorphy2/tagset.py
Class Name: OpencorporaTag
Method Name: _init_restrictions


Project Name: arviz-devs/arviz
Commit Name: 0001654c779c4bffe0ab685c2b1fc498410fed61
Time: 2020-02-13
Author: gautampiyus@gmail.com
File Name: arviz/plots/backends/bokeh/densityplot.py
Class Name:
Method Name: plot_density


Project Name: huyingxi/Synonyms
Commit Name: ea072b70c43877fbeff5af5006bdbb5b8148a65b
Time: 2017-09-28
Author: hailiang.hl.wang@gmail.com
File Name: synonyms/__init__.py
Class Name:
Method Name: