66a06524eba0b22d14204baeb2ca6d4c9db7d1d0,scripts/semantic_types.py,,convert_coq_to_nltk_type,#Any#,245
Before Change
assert (i % 2 == 1) == (type_item == "->")
if type_item.startswith("Entity"):
type_ids.append("e")
elif type_item.startswith("Prop"):
type_ids.append("t")
elif type_item.startswith("Event"):
type_ids.append("v")
After Change
assert parameter == "Parameter" and colon == ":"
// This list contains something like ["Entity", "->", "Prop", "->", "Prop"...]
type_sig = coq_type_list[3:]
nltk_type_str = " ".join(type_sig).rstrip(".").replace(
"->", " ").replace(
"Entity", "e").replace(
"Prop", "t").replace(
"Event", "v")
if not nltk_type_str.startswith("(") or not nltk_type_str.endswith("("):
nltk_type_str = "(" + nltk_type_str + ")"
// Add pre-terminals (necessary for NLTK, if we convert to CNF).
nltk_type_str = re.sub(r"([evt])", r"(N \1)", nltk_type_str)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: mynlp/ccg2lambda
Commit Name: 66a06524eba0b22d14204baeb2ca6d4c9db7d1d0
Time: 2017-05-12
Author: pascual@nii.ac.jp
File Name: scripts/semantic_types.py
Class Name:
Method Name: convert_coq_to_nltk_type
Project Name: comic/grand-challenge.org
Commit Name: c8f80caf3b3a5707a2d5d2b9dfee1e4e80f1b3be
Time: 2017-05-09
Author: jamesmeakin@gmail.com
File Name: django/comicsite/templatetags/comic_templatetags.py
Class Name: comic_URLNode
Method Name: render
Project Name: GoogleCloudPlatform/professional-services
Commit Name: 2ead72bb408de052c24cf7066cae0563e728d4b3
Time: 2019-05-02
Author: bmenasha@google.com
File Name: tools/asset-inventory/asset_inventory/import_pipeline.py
Class Name: DeleteDataSetTables
Method Name: process