A method for machine reading comprehension includes: S1, obtaining a character-level indication vector of a question and a character-level indication vector of an article; S2, obtaining an encoded question vector and an encoded article vector; S3, obtaining an output P1 of a bidirectional attention model and an output P2 of a shared attention model; S4, obtaining an aggregated vector P3; S5, obtaining a text encoding vector P4; S6, obtaining global interaction information between words within the article; S7, obtaining a text vector P5 after using the self-attention model; S8, obtaining aggregated data P6 according to the text encoding vector P4 and the text vector P5; S9, obtaining a context vector of the article according to the aggregated data P6 and an unencoded article vector P; and S10, predicting an answer position according to the context vector of the article and the encoded question vector to complete the machine reading comprehension.
METHOD FOR MACHINE READING COMPREHENSION