Query formatting system, query formatting method, and information storage medium
AssigneeRakuten Group, Inc.
InventorsYuki Nakayama, Koji Murakami
Life of this patent
Estimating the term…
Abstract
Provided is a query formatting system including at least one processor configured to: acquire a plurality of tokens included in a query; execute matching through use of dictionary data based on the plurality of tokens; and format a second token which fails to match the dictionary data among the plurality of tokens based on a first token which matches the dictionary data among the plurality of tokens and a learning model relating to query formatting.
Claims21
A query formatting system, comprising at least one processor configured to:
- acquire a plurality of first tokens included in a query, where each of the plurality of first tokens includes at least one word or word fragment;
- execute matching through use of dictionary data based on the plurality of first tokens;
- label each token that matches at least one dictionary data as a first token;
- format each first token that matched at least one dictionary data;
- label each token that did not match at least one dictionary data as a second token;
- input each second token into a learning model to obtain a second label only for each of a plurality of second characters included in the second token;
- format the second token based on one of the plurality of first tokens, which matches the dictionary data, and the second label for each of the plurality of second characters;
- execute search processing based on the formatted second token;
- the least one processor is further configured to:
- calculate, for each first character included in the first token, a first character feature amount relating to a feature of the each first character by inputting a first character sequence contained in the first token and a first operation sequence of the query based on the matching into the learning model;
- acquire a first token feature amount which is calculated based on a predetermined calculation method, and relates to a feature of the first token itself;
- calculate, for the each first character, an average of the first character feature amount of the each first character and the first token feature amount;
- calculate, for each second character included in the second token, a second character feature amount relating to a feature of the each second character by inputting a second character sequence contained in the second token and a second operation sequence of the query based on the matching into the learning model;
- format the second token based on an output sequence indicating attributes of the characters of the first token and the second token output by the learning model in accordance with the first character feature amount and the second character feature amount after the average has been calculated;
- feed a resulting sequence of the feature amounts into a fully-connected layer followed by a conditional random field (CRF) layer of the learning model:
- obtain, as the label for each second character, one of the BIOES labels “B”, “I”, “O”, “E”, or “S”;
- and
- wherein the first tokens are formatted.
A query formatting method, comprising:
- acquiring a plurality of first tokens included in a query, where each of the plurality of first tokens includes at least one word or word fragment;
- executing matching through use of dictionary data based on the plurality of first tokens;
- labelling each token that matches at least one dictionary data as a first token;
- formatting each first token that matched at least one dictionary data;
- labelling each token that did not match at least one dictionary data as a second token;
- inputting each second token into a learning model to obtain a second label only for each of a plurality of second characters included in the second token;
- formatting the second token based on one of the plurality of first tokens, which matches the dictionary data, and the second label for each of the plurality of second characters;
- searching based on the formatted second token;
- calculating, for each first character included in the first token, a first character feature amount relating to a feature of the each first character by inputting a first character sequence contained in the first token and a first operation sequence of the query based on the matching into the learning model;
- acquiring a first token feature amount which is calculated based on a predetermined calculation method, and relates to a feature of the first token itself;
- calculating, for the each first character, an average of the first character feature amount of the each first character and the first token feature amount;
- calculating, for each second character included in the second token, a second character feature amount relating to a feature of the each second character by inputting a second character sequence contained in the second token and a second operation sequence of the query based on the matching into the learning model;
- formatting the second token based on an output sequence indicating attributes of the characters of the first token and the second token output by the learning model in accordance with the first character feature amount and the second character feature amount after the average has been calculated;
- feeding a resulting sequence of the feature amounts into a fully-connected layer followed by a conditional random field (CRF) layer of the learning model;
- obtaining, as the label for each second character, one of the BIOES labels “B”, “I”, “O”, “E”, or “S”;
- and
- wherein the first tokens are formatted.
A non-transitory information storage medium having stored thereon a program for causing a computer to:
- acquire a plurality of first tokens included in a query, where each of the plurality of first tokens includes at least one word or word fragment;
- execute matching through use of dictionary data based on the plurality of first tokens;
- label each token that matches at least one dictionary data as a first token;
- format each first token that matched at least one dictionary data;
- label each token that did not match at least one dictionary data as a second token;
- input each second token into a learning model to obtain a second label only for each of a plurality of second characters included in the second token;
- format the second token based on one of the plurality of first tokens, which matches the dictionary data, and the second label for each of the plurality of second characters;
- execute search processing based on the formatted second token;
- calculate, for each first character included in the first token, a first character feature amount relating to a feature of the each first character by inputting a first character sequence contained in the first token and a first operation sequence of the query based on the matching into the learning model;
- acquire a first token feature amount which is calculated based on a predetermined calculation method, and relates to a feature of the first token itself;
- calculate, for the each first character, an average of the first character feature amount of the each first character and the first token feature amount;
- calculate, for each second character included in the second token, a second character feature amount relating to a feature of the each second character by inputting a second character sequence contained in the second token and a second operation sequence of the query based on the matching into the learning model;
- format the second token based on an output sequence indicating attributes of the characters of the first token and the second token output by the learning model in accordance with the first character feature amount and the second character feature amount after the average has been calculated;
- feed a resulting sequence of the feature amounts into a fully-connected layer followed by a conditional random field (CRF) layer of the learning model;
- obtain, as the label for each second character, one of the BIOES labels “B”, “I”, “O”, “E”, or “S”;
- and
- wherein the first tokens are formatted.
Dependencies are inferred from the claim text.