Method and apparatus for extracting name of POI, device and computer storage medium
Abstract
The present application discloses a method and apparatus for extracting the name of a POI, a device and a computer storage medium, and relates to the field of big data. An implementation includes: acquiring two or more text fragments identified from image data of the POI; constructing two or more candidate names using the text fragments; and ranking the candidate names using a pre-trained name ranking model, and determining the name of the POI according to the result of the ranking; wherein the name ranking model determines the probability of each candidate name as the name of the POI using at least one of a search web page feature, a document statistical feature and a semantic feature extracted from each candidate name, and ranks the candidate names according to the probabilities. With the present application, the name of the POI is automatically extracted with high accuracy. Compared with the manual review and annotation way in the prior art, a human cost is reduced.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method for extracting the name of a point of interest (POI), comprising:
acquiring two or more text fragments identified from image data of the POI;
constructing two or more candidate names using the text fragments; and
ranking the candidate names using a pre-trained name ranking model, and determining the name of the POI according to the result of the ranking;
wherein the name ranking model determines the probability of each candidate name as the name of the POI using at least one of a search web page feature, a document statistical feature and a semantic feature extracted from each candidate name, and ranks the candidate names according to the probabilities,
wherein extracting the search web page feature from the candidate name comprises:
performing a search with the candidate name as a query; and
performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result as the search web page feature of the candidate name,
wherein the performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result comprises:
acquiring top N search result texts, N being a preset positive integer;
performing a semantic coding operation on each acquired search result text to obtain an implicit vector of each search result text; and
fusing the implicit vectors of the search result texts to obtain the implicit vector of the search result.
2. The method according to claim 1 , wherein the constructing two or more candidate names using the text fragments comprises:
permuting and combining the text fragments to obtain the two or more candidate names;
the determining the name of the POI according to the result of the ranking comprises:
taking the top candidate name as the name of the POI.
3. The method according to claim 1 , wherein the constructing two or more candidate names using the text fragments comprises:
identifying a branch information fragment from the text fragments; and
permuting and combining other text fragments in the text fragments than the branch information fragment to obtain the two or more candidate names;
the determining the name of the POI according to the result of the ranking comprises:
combining the top candidate name with the branch information fragment to obtain the name of the POI.
4. The method according to claim 3 , wherein the identifying a branch information fragment from the text fragments comprises:
judging each text fragment using a pre-trained judging model to determine whether each text fragment is the branch information fragment.
5. The method according to claim 4 , wherein the judging model is pre-trained by:
acquiring sample data from a POI database with a branch information text as a positive sample and a non-branch information text as a negative sample; and
training the judging model with the sample data.
6. The method according to claim 1 , wherein extracting the document statistical feature from the candidate name comprises:
counting an inverse document frequency of the candidate name in web page data; and
taking a representation vector of the inverse document frequency as the document statistical feature of the candidate name.
7. The method according to claim 1 , wherein extracting the semantic feature from the candidate name comprises:
obtaining a semantic representation vector of each text fragment contained in the candidate name based on at least one of a semantic feature, a position feature and a document statistical feature of each text fragment; and
fusing the semantic representation vectors of the text fragments to obtain the semantic representation vector of the candidate name.
8. The method according to claim 7 , wherein the semantic representation vector of the text fragment is determined by:
performing a semantic coding operation on the text fragment to obtain an implicit vector of the text fragment;
mapping the position of the text fragment in a candidate name in a vector space to obtain a position representation vector of the text fragment;
counting an inverse document frequency of the text fragment in the web page data to obtain a representation vector of the inverse document frequency; and
splicing the implicit vector, the position representation vector and the representation vector of the inverse document frequency of the text fragment to obtain the semantic representation vector of the text fragment.
9. A method for building a name ranking model, comprising:
acquiring training samples comprising a positive example and a negative example of the name of a POI;
extracting at least one of a search web page feature, a document statistical feature and a semantic feature from each training sample, and determining the probability of each training sample as the name of the POI; and
performing a training operation with a pairwise algorithm to obtain the name ranking model with a training target of maximizing the difference between the probability of the positive example as the name of the POI and the probability of the negative example as the name of the POI,
wherein extracting the search web page feature from the training sample comprises:
performing a search with the training sample as a query; and
performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result as the search web page feature of the training sample,
wherein the performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result comprises:
acquiring top N search result texts, N being a preset positive integer;
performing a semantic coding operation on each acquired search result text to obtain an implicit vector of each search result text; and
fusing the implicit vectors of the search result texts to obtain the implicit vector of the search result.
10. The method according to claim 9 , wherein extracting the document statistical feature from the training sample comprises:
counting an inverse document frequency of the training sample in web page data; and
taking a representation vector of the inverse document frequency as the document statistical feature of the training sample.
11. The method according to claim 9 , wherein extracting the semantic feature from the training sample comprises:
obtaining a semantic representation vector of each text fragment contained in the training sample based on at least one of a semantic feature, a position feature and a document statistical feature of each text fragment; and
fusing the semantic representation vectors of the text fragments to obtain the semantic representation vector of the training sample.
12. The method according to claim 11 , wherein the semantic representation vector of the text fragment is determined by:
performing a semantic coding operation on the text fragment to obtain an implicit vector of the text fragment;
mapping the position of the text fragment in a candidate name in a vector space to obtain a position representation vector of the text fragment;
counting an inverse document frequency of the text fragment in the web page data to obtain a representation vector of the inverse document frequency; and
splicing the implicit vector, the position representation vector and the representation vector of the inverse document frequency of the text fragment to obtain the semantic representation vector of the text fragment.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively connected with the at least one processor;
wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform a method for extracting the name of a point of interest (POI) comprising:
acquiring two or more text fragments identified from image data of the POI;
constructing two or more candidate names using the text fragments; and
ranking the candidate names using a pre-trained name ranking model, and determining the name of the POI according to the result of the ranking;
wherein the name ranking model determines the probability of each candidate name as the name of the POI using at least one of a search web page feature, a document statistical feature and a semantic feature extracted from each candidate name, and ranks the candidate names according to the probabilities,
wherein extracting the search web page feature from the candidate name comprises:
performing a search with the candidate name as a query; and
performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result as the search web page feature of the candidate name,
wherein the performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result comprises:
acquiring top N search result texts, N being a preset positive integer;
performing a semantic coding operation on each acquired search result text to obtain an implicit vector of each search result text; and
fusing the implicit vectors of the search result texts to obtain the implicit vector of the search result.
14. An electronic device, comprising:
at least one processor; and
a memory communicatively connected with the at least one processor;
wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform a method for building a name ranking model comprising:
acquiring training samples comprising a positive example and a negative example of the name of a POI;
extracting at least one of a search web page feature, a document statistical feature and a semantic feature from each training sample, and determining the probability of each training sample as the name of the POI; and
performing a training operation with a pairwise algorithm to obtain the name ranking model with a training target of maximizing the difference between the probability of the positive example as the name of the POI and the probability of the negative example as the name of the POI;
wherein extracting the search web page feature from the training sample comprises:
performing a search with the training sample as a query; and
performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result as the search web page feature of the training sample,
wherein the performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result comprises:
acquiring top N search result texts, N being a preset positive integer;
performing a semantic coding operation on each acquired search result text to obtain an implicit vector of each search result text; and
fusing the implicit vectors of the search result texts to obtain the implicit vector of the search result.
15. A non-transitory computer-readable storage medium storing computer instructions therein, wherein the computer instructions are used to cause the computer to perform a method for extracting the name of a point of interest (POI) comprising:
acquiring two or more text fragments identified from image data of the POI;
constructing two or more candidate names using the text fragments; and
ranking the candidate names using a pre-trained name ranking model, and determining the name of the POI according to the result of the ranking;
wherein the name ranking model determines the probability of each candidate name as the name of the POI using at least one of a search web page feature, a document statistical feature and a semantic feature extracted from each candidate name, and ranks the candidate names according to the probabilities,
wherein extracting the search web page feature from the candidate name comprises:
performing a search with the candidate name as a query; and
performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result as the search web page feature of the candidate name,
wherein the performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result comprises:
acquiring top N search result texts, N being a preset positive integer;
performing a semantic coding operation on each acquired search result text to obtain an implicit vector of each search result text; and
fusing the implicit vectors of the search result texts to obtain the implicit vector of the search result.
16. A non-transitory computer-readable storage medium storing computer instructions therein, wherein the computer instructions are used to cause the computer to perform a method for building a name ranking model comprising:
acquiring training samples comprising a positive example and a negative example of the name of a POI;
extracting at least one of a search web page feature, a document statistical feature and a semantic feature from each training sample, and determining the probability of each training sample as the name of the POI; and
performing a training operation with a pairwise algorithm to obtain the name ranking model with a training target of maximizing the difference between the probability of the positive example as the name of the POI and the probability of the negative example as the name of the POI,
wherein extracting the search web page feature from the training sample comprises:
performing a search with the training sample as a query; and
performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result as the search web page feature of the training sample,
wherein the performing a semantic coding operation on an acquired search result to obtain an implicit vector of the search result comprises:
acquiring top N search result texts, N being a preset positive integer;
performing a semantic coding operation on each acquired search result text to obtain an implicit vector of each search result text; and
fusing the implicit vectors of the search result texts to obtain the implicit vector of the search result.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.