A method for determining, from a document, an answer to a query using a query answering system, comprising: (i) encoding, using an encoder, one or more documents; (ii) encoding a received query; (iii) generating, using an attention mechanism, a query-aware document representation comprising alignment between one or more words in one of the plurality of documents and one or more words in the query; (iv) generating, using a hierarchical self-attention mechanism, a word-to-sentence alignment of the query-aware document representation; (v) labeling, using a conditional random field classifier, each of a plurality of words in the word-to-sentence alignment with one of a one of a plurality of different sequence identifiers, resulting in possible labeled answering spans; and (vi) generating, from the one or more possible labeled answering spans, a response to the query.
CRF-BASED SPAN PREDICTION FOR FINE MACHINE LEARNING COMPREHENSION