A method of searching within one or more documents includes receiving a query through a user interface, e.g. a search bar 206, and in conjunction with identification of the at least one document. A feature value characterising a relevance of each grammatical unit of the document to the search term is extracted. The grammatical units are ranked based on their feature values. At least one selected grammatical unit is then displayed, based on the ranking. The grammatical unit may be a phrase, clause, sentence, or paragraph. The ranking 209, 211, of each grammatical unit 208, 210 may be displayed alongside it. The query may be spoken by a user, captured using speech recognition, and displayed on the user interface. A semantic similarity measure may be calculated between the query and each grammatical unit, based on vector representations of each word in the query and the grammatical unit.
Document search using grammatical units