コード例 #1
0
def init():
  ddext.input('lattice_id', 'text')
  ddext.input('starts', 'bigint[]')
  ddext.input('ends', 'bigint[]')
  ddext.input('candidates', 'text[]')
  ddext.input('candidate_ids', 'bigint[]')
  ddext.input('expectations', 'float[]')

  ddext.returns('lattice_id', 'text')
  ddext.returns('words', 'text[]')
コード例 #2
0
def init():
    ddext.input('lattice_id', 'text')
    ddext.input('starts', 'bigint[]')
    ddext.input('ends', 'bigint[]')
    ddext.input('candidates', 'text[]')
    ddext.input('candidate_ids', 'bigint[]')
    ddext.input('expectations', 'float[]')

    ddext.returns('lattice_id', 'text')
    ddext.returns('words', 'text[]')
コード例 #3
0
def init():

    ddext.import_lib('json')

    ddext.input('publication_id', 'bigint')
    ddext.input('fname_prefix', 'text')
    ddext.input('fname', 'text[]')
    ddext.input('fval', 'float[]')

    ddext.returns('publication_id', 'bigint')
    ddext.returns('features', 'text')
コード例 #4
0
def init():
  
  ddext.import_lib('json')

  ddext.input('publication_id', 'bigint')
  ddext.input('fname_prefix', 'text')
  ddext.input('fname', 'text[]')
  ddext.input('fval', 'float[]')
  
  ddext.returns('publication_id', 'bigint')
  ddext.returns('features', 'text')
コード例 #5
0
def init():
    # SD['json'] = __import__('json')
    ddext.import_lib("re")
    ddext.import_lib("sys")
    ddext.input("words", "text[]")
    ddext.input("id", "bigint")  # Orders of input MATTERS now
    ddext.input("p1_start", "int")
    ddext.input("p1_length", "int")
    ddext.input("p2_start", "int")
    ddext.input("p2_length", "int")

    ddext.returns("relation_id", "bigint")
    ddext.returns("feature", "text")
コード例 #6
0
def init():
    # SD['json'] = __import__('json')
    ddext.import_lib('re')
    ddext.import_lib('sys')
    ddext.input('words', 'text[]')
    ddext.input('id', 'bigint')  # Orders of input MATTERS now
    ddext.input('p1_start', 'int')
    ddext.input('p1_length', 'int')
    ddext.input('p2_start', 'int')
    ddext.input('p2_length', 'int')

    ddext.returns('relation_id', 'bigint')
    ddext.returns('feature', 'text')
コード例 #7
0
ファイル: input-3.py プロジェクト: Atlas7/deepdive
def init():
  # SD['json'] = __import__('json')
  ddext.import_lib('re')
  ddext.import_lib('sys')
  ddext.input('words', 'text[]')
  ddext.input('id', 'bigint') # Orders of input MATTERS now
  ddext.input('p1_start', 'int')
  ddext.input('p1_length', 'int')
  ddext.input('p2_start', 'int')
  ddext.input('p2_length', 'int')

  ddext.returns('relation_id', 'bigint')
  ddext.returns('feature', 'text')
コード例 #8
0
ファイル: ext_relation_mention.py プロジェクト: fmacias64/kbp
def init():

	ddext.input('doc_id', 'text')
	ddext.input('sentence_id', 'text')
	ddext.input('words', 'text[]')
	ddext.input('pos', 'text[]')
	ddext.input('ner', 'text[]')
	ddext.input('lemma', 'text[]')
	ddext.input('character_offset_begin', 'integer[]')
	ddext.input('character_offset_end', 'integer[]')

	ddext.returns('doc_id', 'text')
	ddext.returns('mid1', 'text')
	ddext.returns('mid2', 'text')
	ddext.returns('word1', 'text')
	ddext.returns('word2', 'text')
コード例 #9
0
ファイル: ext_people.py プロジェクト: xlong88/deepdive
def init():
  # SD['json'] = __import__('json')
  ddext.import_lib('itertools')

  # Input commands MUST HAVE CORRECT ORDER
  ddext.input('sentence_id', 'text')
  ddext.input('words', 'text[]')
  ddext.input('ner_tags', 'text[]')

  # Returns commands MUST HAVE CORRECT ORDER
  ddext.returns('sentence_id', 'text')
  ddext.returns('start_position', 'int')
  # ddext.returns('start_index', 'int')
  ddext.returns('length', 'int')
  ddext.returns('text', 'text')
  ddext.returns('mention_id', 'text')
コード例 #10
0
def init():
    #ddext.import_lib('re')
    ddext.input('doc_id', 'text')
    ddext.input('words', 'text')

    ddext.returns('id', 'bigint')
    ddext.returns('doc_id', 'text')
    ddext.returns('is_true', 'boolean')
    ddext.returns('features', 'text[]')
コード例 #11
0
ファイル: ext_stopwords.py プロジェクト: zifeishan/deepsaa
def init():
  ddext.input('sentence_id', 'bigint')
  ddext.input('document_id', 'bigint')
  ddext.input('words', 'text[]')
  
  ddext.returns('sentence_id', 'bigint')
  ddext.returns('publication_id', 'bigint')
  ddext.returns('ngram', 'text')
  ddext.returns('count', 'bigint')
コード例 #12
0
def init():
  ddext.input('sentence_id', 'bigint')
  ddext.input('document_id', 'bigint')
  ddext.input('words', 'text[]')
  
  ddext.returns('sentence_id', 'bigint')
  ddext.returns('publication_id', 'bigint')
  ddext.returns('fname', 'text')
  ddext.returns('fval', 'int')
コード例 #13
0
ファイル: ext_char_ngram.py プロジェクト: zifeishan/deepsaa
def init():
  ddext.input('sentence_id', 'bigint')
  ddext.input('document_id', 'bigint')
  ddext.input('sentence', 'text')
  ddext.input('gram_len', 'int')

  ddext.returns('sentence_id', 'bigint')
  ddext.returns('publication_id', 'bigint')
  ddext.returns('ngram', 'text')
  ddext.returns('count', 'int')
コード例 #14
0
def init():
  ddext.input('docid', 'TEXT')
  ddext.input('candidate_id', 'TEXT')
  ddext.input('word', 'text')
  ddext.input('gram_len', 'int')

  ddext.returns('docid', 'TEXT')
  ddext.returns('candidate_id', 'TEXT')
  ddext.returns('ngram', 'text')
  ddext.returns('count', 'int')
コード例 #15
0
def init():
    ddext.input('docid', 'TEXT')
    ddext.input('candidate_id', 'TEXT')
    ddext.input('word', 'text')
    ddext.input('gram_len', 'int')

    ddext.returns('docid', 'TEXT')
    ddext.returns('candidate_id', 'TEXT')
    ddext.returns('ngram', 'text')
    ddext.returns('count', 'int')
コード例 #16
0
def init():
    ddext.input('sentence_id', 'bigint')
    ddext.input('publication_id', 'bigint')
    ddext.input('fname_prefix', 'text')
    ddext.input('fname', 'text[]')
    ddext.input('fval', 'real[]')

    ddext.returns('sentence_id', 'bigint')
    ddext.returns('publication_id', 'bigint')
    ddext.returns('fname_prefix', 'text')
    ddext.returns('fname', 'text')
コード例 #17
0
def init():
  ddext.input('sentence_id', 'bigint')
  ddext.input('publication_id', 'bigint')
  ddext.input('fname_prefix', 'text')
  ddext.input('fname', 'text[]')
  ddext.input('fval', 'real[]')
  
  ddext.returns('sentence_id', 'bigint')
  ddext.returns('publication_id', 'bigint')
  ddext.returns('fname_prefix', 'text')
  ddext.returns('fname', 'text')
コード例 #18
0
def init():
    ddext.input('lattice_id', 'text')
    ddext.input('starts', 'bigint[]')
    ddext.input('ends', 'bigint[]')
    ddext.input('arr_feature', 'text[]')
    ddext.input('candidate_ids', 'bigint[]')
    ddext.input('gram_len', 'bigint')

    ddext.returns('lattice_id', 'text')
    ddext.returns('candidate_id', 'bigint')
    ddext.returns('ngram', 'text')
    ddext.returns('skipping', 'boolean')
コード例 #19
0
def init():
  ddext.input('lattice_id', 'text')
  ddext.input('starts', 'bigint[]')
  ddext.input('ends', 'bigint[]')
  ddext.input('arr_feature', 'text[]')
  ddext.input('candidate_ids', 'bigint[]')
  ddext.input('gram_len', 'bigint')

  ddext.returns('lattice_id', 'text')
  ddext.returns('candidate_id', 'bigint')
  ddext.returns('ngram', 'text')
  ddext.returns('skipping', 'boolean')
コード例 #20
0
def init():
  ddext.input('docid', 'text')
  ddext.input('arr_candidate_id', 'text[]')
  ddext.input('arr_cand_word_id', 'text[]')
  ddext.input('arr_varid', 'bigint[]')
  ddext.input('arr_candid', 'bigint[]')
  ddext.input('arr_feature', 'text[]')
  ddext.input('gram_len', 'bigint')

  ddext.returns('docid', 'text')
  ddext.returns('cand_word_id', 'text')
  ddext.returns('candidate_id', 'text')
  ddext.returns('ngram', 'text')
コード例 #21
0
def init():
  ddext.import_lib('re')
  ddext.input('lattice_id', 'text')

  ddext.returns('lattice_id', 'text')
  ddext.returns('speaker_id', 'text')
  ddext.returns('sentenceid', 'text')
コード例 #22
0
def init():
    ddext.import_lib('re')
    ddext.input('lattice_id', 'text')

    ddext.returns('lattice_id', 'text')
    ddext.returns('speaker_id', 'text')
    ddext.returns('sentenceid', 'text')
コード例 #23
0
def init():
  ddext.input('docid', 'text')
  ddext.input('words', 'text[]')
  ddext.input('gram_len', 'bigint')
  ddext.input('count_filter', 'bigint')
  ddext.returns('docid', 'text')
  ddext.returns('ngram', 'text')
  ddext.returns('count', 'real')
コード例 #24
0
def init():
    ddext.input('docid', 'text')
    ddext.input('words', 'text[]')
    ddext.input('gram_len', 'bigint')
    ddext.input('count_filter', 'bigint')
    ddext.returns('docid', 'text')
    ddext.returns('ngram', 'text')
    ddext.returns('count', 'real')
コード例 #25
0
def init():
    ddext.input('lattice_id', 'text')
    ddext.input('candidate_id', 'bigint')
    ddext.input('ngram', 'text')

    ddext.returns('lattice_id', 'text')
    ddext.returns('candidate_id', 'bigint')
    ddext.returns('ngram', 'text')
コード例 #26
0
def init():
    ddext.input("lattice_id", "text")
    ddext.input("candidate_id", "bigint")
    ddext.input("ngram", "text")

    ddext.returns("lattice_id", "text")
    ddext.returns("candidate_id", "bigint")
    ddext.returns("ngram", "text")
コード例 #27
0
def init():
  ddext.import_lib('nltk')

  ddext.input('lattice_id', 'text')
  ddext.input('candidate_id', 'bigint')
  ddext.input('word', 'text')

  ddext.returns('lattice_id', 'text')
  ddext.returns('candidate_id', 'bigint')
  ddext.returns('pos', 'text')
コード例 #28
0
def init():
    ddext.input('publication_id', 'bigint')
    ddext.input('datestamp', 'text')
    ddext.input('title', 'text')
    # ddext.input('fulltext', 'text')
    ddext.input('sentences', 'text[]')

    ddext.returns('publication_id', 'bigint')
    ddext.returns('fname', 'text')
    ddext.returns('fval', 'real')
コード例 #29
0
ファイル: ext_doc_stats.py プロジェクト: zifeishan/deepsaa
def init():
  ddext.input('publication_id', 'bigint')
  ddext.input('datestamp', 'text')
  ddext.input('title', 'text')
  # ddext.input('fulltext', 'text')
  ddext.input('sentences', 'text[]')
  
  ddext.returns('publication_id', 'bigint')
  ddext.returns('fname', 'text')
  ddext.returns('fval', 'real')
コード例 #30
0
def init():
    ddext.import_lib('nltk')

    ddext.input('lattice_id', 'text')
    ddext.input('candidate_id', 'bigint')
    ddext.input('word', 'text')

    ddext.returns('lattice_id', 'text')
    ddext.returns('candidate_id', 'bigint')
    ddext.returns('pos', 'text')
コード例 #31
0
def init():
  ddext.input('lattice_id', 'text')
  ddext.input('starts', 'bigint[]')
  ddext.input('ends', 'bigint[]')
  ddext.input('candidates', 'text[]')
  ddext.input('candidate_ids', 'bigint[]')
  ddext.input('transcript', 'text[]')

  ddext.returns('lattice_id', 'text')
  ddext.returns('candidate_id', 'bigint')
  ddext.returns('is_true', 'boolean')
コード例 #32
0
def init():
    ddext.input('lattice_id', 'text')
    ddext.input('starts', 'bigint[]')
    ddext.input('ends', 'bigint[]')
    ddext.input('candidates', 'text[]')
    ddext.input('candidate_ids', 'bigint[]')
    ddext.input('transcript', 'text[]')

    ddext.returns('lattice_id', 'text')
    ddext.returns('candidate_id', 'bigint')
    ddext.returns('is_true', 'boolean')
コード例 #33
0
def init():
    ddext.input('doc_id', 'text')
    ddext.input('sent_id', 'int')
    ddext.input('words', 'text[]')
    ddext.input('lemmas', 'text[]')
    ddext.input('poses', 'text[]')
    ddext.input('ners', 'text[]')
    ddext.input('dep_paths', 'text[]')
    ddext.input('dep_parents', 'int[]')
    ddext.input('mention_id', 'text')
    ddext.input('wordidxs', 'int[]')

    ddext.returns('doc_id', 'text')
    ddext.returns('mention_id', 'text')
    ddext.returns('feature', 'text')
コード例 #34
0
ファイル: pair_features.py プロジェクト: robinjia/dd-genomics
def init():
  ddext.input('doc_id', 'text')
  ddext.input('sent_id', 'int')
  ddext.input('words', 'text[]')
  ddext.input('lemmas', 'text[]')
  ddext.input('poses', 'text[]')
  ddext.input('ners', 'text[]')
  ddext.input('dep_paths', 'text[]')
  ddext.input('dep_parents', 'int[]')
  ddext.input('wordidxs', 'int[]')
  ddext.input('relation_id', 'text')
  ddext.input('wordidxs_1', 'int[]')
  ddext.input('wordidxs_2', 'int[]')

  ddext.returns('doc_id', 'text')
  ddext.returns('relation_id', 'text')
  ddext.returns('feature', 'text')
コード例 #35
0
def init():

    # import libraries
    ddext.import_lib(csv)
    ddext.import_lib(os)
    ddext.import_lib(sys)
    ddext.import_lib(re)

    #specify inputs
    ddext.input('sentence_id','text')
    ddext.input('p1_mention_id','text')
    ddext.input('p1_text','text')
    ddext.input('p2_mention_id','text')
    ddext.input('p2_text','text')

    # specify outputs
    ddext.returns('person1_id','text')
    ddext.returns('person2_id','text')
    ddext.returns('sentence_id','text')
    ddext.returns('description','text')
    ddext.returns('is_true','boolean')
    ddext.returns('relation_id','text')
    ddext.returns('description','text')
    ddext.returns('id','bigint')

    # The directory of this UDF file
    BASE_DIR = os.path.dirname(os.path.realpath(__file__))

    # Load ids_names dict
    ids_names = {}
    with open(BASE_DIR + '/../data/ids_names.tsv') as f:
        for i,line in enumerate(f):
            line = line.split('\t')
            doc_id = line[0]
            name = line[1].rstrip()
            ids_names[doc_id] = name

    # Load the parent dictionary for distant supervision.
    # The first person is the child, the second the parent
    kid_parent_relationship = set()
    people_already_seen_as_kid = set()
    people_already_seen_as_parent = set()
    non_kid_parent_relationship = set()
    lines = open(BASE_DIR + '/../data/training-data-parent.tsv').readlines()
    for line in lines:
        arr = re.split('\s*\t\s*', line.strip().lower())
        if len(arr) != 3:
        # print >> sys.stderr, line
            continue
        nameKid, nameParent, relation = arr
        if relation=="1":
            kid_parent_relationship.add((nameKid, nameParent))  # Add a spouse relation pair
            people_already_seen_as_kid.add(nameKid)    # Record the person as married
            people_already_seen_as_parent.add(nameParent)
        else:
            non_kid_parent_relationship.add((nameKid, nameParent))
コード例 #36
0
ファイル: input-2.py プロジェクト: therollingball/deepdive
def init():
    # SD['json'] = __import__('json')
    ddext.import_lib('csv')
    ddext.import_lib('os')
    # from collections import defaultdict
    ddext.import_lib('defaultdict', 'collections')

    # Other examples of import_lib:
    # # "from collections import defaultdict as defdict":
    # ddext.import_lib('defaultdict', 'collections', 'defdict')
    # # "import defaultdict as defdict":
    # ddext.import_lib('defaultdict', as_name='defdict')

    # Input commands MUST HAVE CORRECT ORDER:
    # SAME AS SELECT ORDER, and SAME AS "run" ARGUMENT ORDER
    ddext.input('sentence_id', 'text')
    ddext.input('p1_id', 'text')
    ddext.input('p1_text', 'text')
    ddext.input('p2_id', 'text')
    ddext.input('p2_text', 'text')

    # Returns commands MUST HAVE CORRECT ORDER
    ddext.returns('person1_id', 'text')
    ddext.returns('person2_id', 'text')
    ddext.returns('sentence_id', 'text')
    ddext.returns('description', 'text')
    ddext.returns('is_true', 'boolean')
    ddext.returns('relation_id', 'text')
コード例 #37
0
def init():
  ddext.input('doc_id', 'text')
  ddext.input('sent_id', 'int')
  ddext.input('words', 'text[]')
  ddext.input('lemmas', 'text[]')
  ddext.input('poses', 'text[]')
  ddext.input('ners', 'text[]')

  ddext.returns('doc_id', 'text')
  ddext.returns('sent_id', 'int')
  ddext.returns('wordidxs', 'int[]')
  ddext.returns('mention_id', 'text')
  ddext.returns('type', 'text')
  ddext.returns('entity', 'text')
  ddext.returns('words', 'text[]')
  ddext.returns('is_correct', 'boolean')
コード例 #38
0
def init():
  ddext.input('doc_id', 'text')
  ddext.input('sent_id_1', 'int')
  ddext.input('mention_id_1', 'text')
  ddext.input('wordidxs_1', 'int[]')
  ddext.input('words_1', 'text[]')
  ddext.input('entity_1', 'text')
  ddext.input('type_1', 'text')
  ddext.input('correct_1', 'boolean')
  ddext.input('sent_id_2', 'int')
  ddext.input('mention_id_2', 'text')
  ddext.input('wordidxs_2', 'int[]')
  ddext.input('words_2', 'text[]')
  ddext.input('entity_2', 'text')
  ddext.input('type_2', 'text')
  ddext.input('correct_2', 'boolean')

  ddext.returns('doc_id', 'text')
  ddext.returns('sent_id_1', 'int')
  ddext.returns('sent_id_2', 'int')
  ddext.returns('relation_id', 'text')
  ddext.returns('type', 'text')
  ddext.returns('mention_id_1', 'text')
  ddext.returns('mention_id_2', 'text')
  ddext.returns('wordidxs_1', 'int[]')
  ddext.returns('wordidxs_2', 'int[]')
  ddext.returns('words_1', 'text[]')
  ddext.returns('words_2', 'text[]')
  ddext.returns('entity_1', 'text')
  ddext.returns('entity_2', 'text')
  ddext.returns('is_correct', 'boolean')
コード例 #39
0
ファイル: ext_author_names.py プロジェクト: zifeishan/deepsaa
def init():
    ddext.import_lib('re')
    ddext.input('author_names', 'text')
    ddext.returns('name', 'text')
コード例 #40
0
ファイル: ext_author_names.py プロジェクト: zifeishan/deepsaa
def init():
  ddext.import_lib('re')
  ddext.input('author_names', 'text')
  ddext.returns('name', 'text')
コード例 #41
0
def init():
  ddext.input('docid', 'text')
  ddext.input('words', 'text[]')
  ddext.input('gram_len', 'bigint')
  ddext.returns('docid', 'text')
  ddext.returns('ngram', 'text')
コード例 #42
0
ファイル: run.py プロジェクト: zifeishan/deepsaa
def init():
  ddext.import_lib('nltk')

  ddext.input('document_id', 'bigint')
  ddext.input('pid', 'bigint')
  ddext.input('paragraph_id', 'bigint')
  ddext.input('paragraph', 'text')

  ddext.returns('document_id', 'bigint')
  ddext.returns('pid', 'bigint')
  ddext.returns('paragraph_id', 'bigint')
  ddext.returns('sentence', 'text')
  ddext.returns('words', 'text[]')
  # ddext.returns('lemma', 'text[]')
  ddext.returns('pos_tags', 'text[]')
  # ddext.returns('dependencies', 'text[]')
  # ddext.returns('ner_tags', 'text[]')
  ddext.returns('sentence_offset', 'bigint')
コード例 #43
0
ファイル: ext_has_spouse.py プロジェクト: Atlas7/deepdive
def init():
  SD['APP_HOME'] = os.environ['APP_HOME']

  # SD['json'] = __import__('json')
  ddext.import_lib('csv')
  ddext.import_lib('os')
  # from collections import defaultdict
  ddext.import_lib('defaultdict', 'collections')

  # Other examples of import_lib:
  # # "from collections import defaultdict as defdict":
  # ddext.import_lib('defaultdict', 'collections', 'defdict')
  # # "import defaultdict as defdict":
  # ddext.import_lib('defaultdict', as_name='defdict')

  # Input commands MUST HAVE CORRECT ORDER:
  # SAME AS SELECT ORDER, and SAME AS "run" ARGUMENT ORDER
  ddext.input('sentence_id', 'text')
  ddext.input('p1_id', 'text')
  ddext.input('p1_text', 'text')
  ddext.input('p2_id', 'text')
  ddext.input('p2_text', 'text')

  # Returns commands MUST HAVE CORRECT ORDER
  ddext.returns('person1_id', 'text')
  ddext.returns('person2_id', 'text')
  ddext.returns('sentence_id', 'text')
  ddext.returns('description', 'text')
  ddext.returns('is_true', 'boolean')
  ddext.returns('relation_id', 'text')
コード例 #44
0
def init():
    ddext.input('doc_id', 'text')
    ddext.input('sent_id', 'int')
    ddext.input('words', 'text[]')
    ddext.input('lemmas', 'text[]')
    ddext.input('poses', 'text[]')
    ddext.input('ners', 'text[]')

    ddext.returns('doc_id', 'text')
    ddext.returns('sent_id', 'int')
    ddext.returns('wordidxs', 'int[]')
    ddext.returns('mention_id', 'text')
    ddext.returns('type', 'text')
    ddext.returns('entity', 'text')
    ddext.returns('words', 'text[]')
    ddext.returns('is_correct', 'boolean')
コード例 #45
0
def init():
    ddext.import_lib('nltk')

    ddext.input('document_id', 'bigint')
    ddext.input('pid', 'bigint')
    ddext.input('paragraph_id', 'bigint')
    ddext.input('paragraph', 'text')

    ddext.returns('document_id', 'bigint')
    ddext.returns('pid', 'bigint')
    ddext.returns('paragraph_id', 'bigint')
    ddext.returns('sentence', 'text')
    ddext.returns('words', 'text[]')
    # ddext.returns('lemma', 'text[]')
    ddext.returns('pos_tags', 'text[]')
    # ddext.returns('dependencies', 'text[]')
    # ddext.returns('ner_tags', 'text[]')
    ddext.returns('sentence_offset', 'bigint')
コード例 #46
0
def init():
    ddext.input('doc_id', 'text')
    ddext.input('sent_id_1', 'int')
    ddext.input('mention_id_1', 'text')
    ddext.input('wordidxs_1', 'int[]')
    ddext.input('words_1', 'text[]')
    ddext.input('entity_1', 'text')
    ddext.input('type_1', 'text')
    ddext.input('correct_1', 'boolean')
    ddext.input('sent_id_2', 'int')
    ddext.input('mention_id_2', 'text')
    ddext.input('wordidxs_2', 'int[]')
    ddext.input('words_2', 'text[]')
    ddext.input('entity_2', 'text')
    ddext.input('type_2', 'text')
    ddext.input('correct_2', 'boolean')

    ddext.returns('doc_id', 'text')
    ddext.returns('sent_id_1', 'int')
    ddext.returns('sent_id_2', 'int')
    ddext.returns('relation_id', 'text')
    ddext.returns('type', 'text')
    ddext.returns('mention_id_1', 'text')
    ddext.returns('mention_id_2', 'text')
    ddext.returns('wordidxs_1', 'int[]')
    ddext.returns('wordidxs_2', 'int[]')
    ddext.returns('words_1', 'text[]')
    ddext.returns('words_2', 'text[]')
    ddext.returns('entity_1', 'text')
    ddext.returns('entity_2', 'text')
    ddext.returns('is_correct', 'boolean')