Commit 4f3836db authored by Marek Medved's avatar Marek Medved
Browse files

result data description

parent d55f9b68
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -25,6 +25,19 @@ def get_record(db, record_id):
            result.append(sent_res)
        return result

    """
    result data structure
    {rec_id: str,
     q_type: str,
     a_type: str,
     question: list of sentences where sentence['sentence'] is list of tokens (word,lemma,tag,vector) and
               sentence['phrs'] is list of all phrases belonging to this sentence and each phrase is list 
               of tokens (word,lemma,tag,vector)
     a_sel: same as question structure
     a_ext: same as question structure
     text: same as question structure
    }
    """
    data = {}
    data['rec_id'] = record.rec_id
    data['q_type'] = id2qt(qa_type_dict, record.q_type)