Converting natural language input to structured queries

    公开(公告)号:US10691685B2

    公开(公告)日:2020-06-23

    申请号:US15721705

    申请日:2017-09-29

    申请人: Apple Inc.

    摘要: The subject technology provides for converting natural language input to structured queries. The subject technology receives a user input query in a natural language format. The subject technology determines scores for candidate entities derived from the user input query. The subject technology selects an entity with a highest score among the candidate entities, and converts, using a context-free grammar, the user input query to a structured query based at least in part on the selected entity. The subject technology classifies the structured query to an expected answer type, the expected answer type corresponding to a type of an expected answer of the structured query. The subject technology queries a database based on the expected answer type and the structured query, the database including information corresponding to a knowledge graph. The subject technology provides, for display, an answer to the user input query based on a result of querying the database.