A method, system, device and storage medium for identifying place names
By using a preset place name search tree and place name completion dictionary in place name recognition, and combining the start and end positions and subordinate relationships of place names, the problem of inaccurate place name recognition caused by the generalization of deep learning models is solved, and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202210747953.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-06-29
AI Technical Summary
Existing deep learning models have strong generalization in place name recognition, resulting in the recognized place names not conforming to natural language rules, and when the quality of manually labeled data is not high, the recognition accuracy is reduced.
The place name is queried through the preset place name search tree to obtain its starting and ending positions in the sentence, and the place names are merged and disambiguated based on the subordinate relationship and starting and ending positions. The preset place name search tree and place name completion dictionary are used for accurate identification.
The accuracy of place name recognition is improved, avoiding the problems of inaccurate recognition meaning due to differences in character positions and failure to meet the laws of natural language due to the generalization of the learning model.
Smart Images

Figure CN115238692B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of entity recognition technology, and in particular to a place name recognition method, system, device and storage medium. Background Art
[0002] Place name recognition is an important application area of named entity recognition (NER). Existing place name recognition technology uses deep learning models to recognize place names on input corpus.
[0003] Due to the strong generalization of deep learning models, recognized place names fail to conform to natural language rules, making it impossible to accurately identify and parse place names in sentences. Furthermore, existing deep learning models rely on manually annotated data for place name recognition. When the quality of manually annotated data is low, the trained deep learning model can easily misidentify non-existent place names, reducing the accuracy of place name recognition. Therefore, improving the accuracy of place name recognition has become a pressing issue. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a method, system, device, and storage medium for recognizing place names to improve the accuracy of place name recognition. The specific technical solution is as follows:
[0005] A method for identifying a place name, the method comprising:
[0006] Nodes matching the first place names in the first place group are queried from a preset place name search tree, node information of each queried node is extracted, and a node information group is obtained, wherein the preset place name search tree includes multiple nodes, and the place names corresponding to two connected nodes have a subordinate relationship, and the first place names in the first place group are extracted from a statement.
[0007] Based on the start and end position data of each first place name in the sentence, the initial start and end positions in each node information matched by each first place name in the node information group are updated to obtain an initial information group.
[0008] Based on the initial information group, a first operation and a second operation are performed on each first place name to obtain a second place group including a plurality of second place names.
[0009] Optionally, the updating of the initial start and end positions of each node information matched by each first place name in the node information group based on the start and end position data of each first place name in the sentence to obtain the initial information group includes:
[0010] For each first place name, obtain position data for the first character and the last character of the first place name. Determine the position data of the first character as the starting position data of the first place name. Determine the position data of the last character as the ending position data of the first place name. Using the starting position data and the ending position data, update the initial start and end positions in the node information matching the first place name. Determine the updated node information for the first place name as the initial place name information for the first place name.
[0011] The initial information group including a plurality of the initial place name information is obtained, wherein the first place name corresponds to the initial place name information.
[0012] Optionally, performing a first operation and a second operation on each first place name based on the initial information group to obtain a second place group including a plurality of second place names includes:
[0013] For each first place name, based on the subordinate relationship identifier in the initial place name information corresponding to the first place name, it is determined whether a superior place name of the first place name exists in the initial information group. If so, the first place name is determined as the place name to be merged. If the superior place name of the first place name does not exist in the initial information group, the first place name is determined as an initial independent place name.
[0014] The first operation is performed on the initial place name information of each place name to be merged with the subordinate relationship to obtain a merged place name group, wherein the merged place name group includes at least one merged place name and its corresponding merged place name information, and the merged place name includes no less than two first place names.
[0015] The second operation is performed based on the merged place name group and the initial place name information of each initial independent place name to obtain the second place group.
[0016] Optionally, performing the second operation based on the merged place name group and the initial place name information of each initial independent place name to obtain the second place group includes:
[0017] The second operation is performed on each initial independent place name: determining whether the initial start and end position interval of the initial independent place name is within the initial start and end position interval of at least one merged place name information in the merged place name group; if so, deleting the initial independent place name and its corresponding initial place name information; if not, determining the initial independent place name as an independent place name.
[0018] Each merged place name and each independent place name are determined as a second place name to obtain the second place group.
[0019] Optionally, also include:
[0020] The second operation is performed on each initial independent place name: determining whether the degree of match between the place name characters of the initial independent place name and the place name characters input in the user terminal data is greater than a preset threshold. If not, deleting the initial independent place name and its initial place name information. If so, determining the initial independent place name as an independent place name.
[0021] Each merged place name and each independent place name are determined as a second place name to obtain the second place group.
[0022] Optionally, when the first location group is obtained, the method further includes:
[0023] By using a preset place name completion dictionary, the affiliation of each second place name is completed according to the affiliation identifier of each second place name to obtain a final place group.
[0024] A place name recognition system, comprising:
[0025] The first information acquisition unit is used to query the nodes matching the first place names in the first place group from the preset place name search tree, extract the node information of each queried node, and obtain a node information group, wherein the preset place name search tree includes multiple nodes, and the place names corresponding to the two connected nodes have a subordinate relationship, and the first place names in the first place group are extracted from the statement.
[0026] The second information acquisition unit updates the initial start and end positions of each node information matched by each first place name in the node information group based on the start and end position data of each first place name in the sentence to obtain an initial information group.
[0027] The place name acquisition unit performs a first operation and a second operation on each first place name based on the initial information group to obtain a second place group including a plurality of second place names.
[0028] Optionally, the second information acquiring unit is configured to:
[0029] For each first place name, obtain position data for the first character and the last character of the first place name. Determine the position data of the first character as the starting position data of the first place name. Determine the position data of the last character as the ending position data of the first place name. Using the starting position data and the ending position data, update the initial start and end positions in the node information matching the first place name. Determine the updated node information for the first place name as the initial place name information for the first place name.
[0030] The initial information group including a plurality of the initial place name information is obtained, wherein the first place name corresponds to the initial place name information.
[0031] Optionally, the place name acquisition unit is configured to:
[0032] For each first place name, based on the subordinate relationship identifier in the initial place name information corresponding to the first place name, it is determined whether a superior place name of the first place name exists in the initial information group. If so, the first place name is determined as the place name to be merged. If the superior place name of the first place name does not exist in the initial information group, the first place name is determined as an initial independent place name.
[0033] The first operation is performed on the initial place name information of each place name to be merged with the subordinate relationship to obtain a merged place name group, wherein the merged place name group includes at least one merged place name and its corresponding merged place name information, and the merged place name includes no less than two first place names.
[0034] The second operation is performed based on the merged place name group and the initial place name information of each initial independent place name to obtain the second place group.
[0035] Optionally, when the place name acquisition unit performs the second operation based on the merged place name group and the initial place name information of each initial independent place name to obtain the second place group, it is configured to:
[0036] The second operation is performed on each initial independent place name: determining whether the initial start and end position interval of the initial independent place name is within the initial start and end position interval of at least one merged place name information in the merged place name group; if so, deleting the initial independent place name and its corresponding initial place name information; if not, determining the initial independent place name as an independent place name.
[0037] Each merged place name and each independent place name are determined as a second place name to obtain the second place group.
[0038] Optionally, when the place name acquisition unit performs the second operation based on the merged place name group and the initial place name information of each initial independent place name to obtain the second place group, it is further configured to:
[0039] The second operation is performed on each initial independent place name: determining whether the degree of match between the place name characters of the initial independent place name and the place name characters input in the user terminal data is greater than a preset threshold. If not, deleting the initial independent place name and its initial place name information. If so, determining the initial independent place name as an independent place name.
[0040] Each merged place name and each independent place name are determined as a second place name to obtain the second place group.
[0041] Optionally, when the first place group is obtained, the place name recognition system further includes:
[0042] The place name completion unit uses a preset place name completion dictionary to complete the affiliation of each second place name according to the affiliation identifier of each second place name to obtain a final place group.
[0043] A device for identifying a place name, comprising:
[0044] processor;
[0045] A memory for storing instructions executable by the processor.
[0046] The processor is configured to execute the instructions to implement the place name recognition method as described in any one of the above items.
[0047] A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of a place name recognition device, enables the place name recognition device to perform any of the place name recognition methods described above.
[0048] The embodiments of the present invention provide a method, system, device and storage medium for identifying place names. By setting a preset place name search tree, the first place name that matches the place name characters stored in the node is extracted from the sentence. Compared with the prior art, the present invention will not identify non-existent place names. At the same time, by obtaining the starting and ending positions of each first place name in the sentence, and merging and disambiguating the place names based on the starting and ending positions, the present invention avoids the risk of inaccurate recognized meanings due to differences in character positions compared to the prior art. Finally, by merging and disambiguating the place names based on the subordinate relationship and initial starting and ending positions in the initial place name information, the present invention avoids the disadvantage that the final recognized place names do not meet the natural language rules and standard subordinate relationships due to the generalization of the learning model compared to the existing deep learning method. It can be seen that the present invention improves the accuracy of place name recognition.
[0049] Of course, it is not necessary to achieve all of the advantages described above simultaneously in order to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 A flowchart of a method for identifying a place name provided by an embodiment of the present invention;
[0052] Figure 2 A schematic diagram of a dependency relationship provided for an optional embodiment of the present invention;
[0053] Figure 3 A block diagram of a place name recognition system provided for another optional embodiment of the present invention;
[0054] Figure 4 A block diagram of a place name recognition device provided for another optional embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0056] The embodiment of the present invention provides a method for identifying a place name. Figure 1 As shown, the place name recognition method includes:
[0057] S101. Query the nodes matching the first place names in the first place group from the preset place name search tree, extract the node information of each queried node, and obtain a node information group, wherein the preset place name search tree includes multiple nodes, and the place names corresponding to the two connected nodes have a subordinate relationship, and the first place names in the first place group are extracted from the statement.
[0058] Optionally, in an optional embodiment of the present invention, the above sentence may be audio or text containing a place name point.
[0059] The above-mentioned preset place name search tree can be constructed based on a prefix tree using a practical algorithm to retrieve information coded in alphanumeric (PATRICIA). Since the above-mentioned preset place name search tree stores place names and their information, Figure 1 In step S101 shown, the above-mentioned preset place name search tree can extract the first place name that matches the place name characters stored in the node from the above-mentioned statement by character matching. As a result, compared with the prior art, the present invention will not identify non-existent place names. This further improves the accuracy of the place names finally identified. It should be noted that in actual application scenarios, since the above-mentioned PATRICIA prefix tree can realize hot updates of stored data, that is, dynamic insertion of place names can be achieved without interrupting the user's use process. Therefore, when a statement contains a place name that is not stored in a node of the above-mentioned preset place name search tree, the background server can dynamically update the place name and information stored in the preset place name search tree. The present invention will not elaborate on this.
[0060] Optionally, in another optional embodiment of the present invention, the data type of the above-mentioned node information includes but is not limited to: the administrative region level of the first place name stored in the node, the administrative region level of the parent place name of the first place name, and the initial starting and ending positions of the first place name.
[0061] Optionally, in an optional embodiment of the present invention, the above-mentioned subordinate relationship may be a superior-subordinate relationship between the first place names. Specifically:
[0062] like Figure 2As shown, the location name and information stored in node 1 is Province A, a provincial-level administrative region. Nodes 2 and 3 store the location names and information for Cities B and C, respectively, within Province A. Nodes 4 and 5 store the location names and information for Districts D and E, respectively, within City B, as stored in node 2. Nodes 6 and 7 store the location names and information for Districts F and G, respectively, within City C, as stored in node 3. Node 8 stores the location name and information for County H, within District E, as stored in node 5.
[0063] In practice, administrative region names often overlap. Therefore, by establishing affiliation between location names within each node of a pre-set location name search tree, and subsequently merging and disambiguating location names based on these affiliation relationships, the accuracy of the final recognized location names can be improved.
[0064] S102. Based on the start and end position data of each first place name in the sentence, update the initial start and end positions of each node information matched by each first place name in the node information group to obtain an initial information group.
[0065] Optionally, in an optional embodiment of the present invention, since the position of a character in a natural language is different, its meaning in the natural language may change. Figure 1 Step S102 shown can obtain the starting and ending positions of each first place name in the sentence, and through subsequent steps, merge and disambiguate the place names based on the above position information. Compared with the existing technology, the present invention avoids the risk of inaccurate recognized meaning due to differences in character positions, and improves the accuracy of the place names finally recognized.
[0066] S103: Based on the initial information group, perform a first operation and a second operation on each first place name to obtain a second place group including multiple second place names.
[0067] Optionally, in an optional embodiment of the present invention, the first operation may be an operation of merging different first place names. The second operation may be an operation of disambiguating various first place names that are prone to ambiguity, because in actual application scenarios, the positions of various place names in the sentence are not in the order of standard subordination. For example, the prosperity of B confirms the reform achievements of A this year. Among them, B is a subordinate city of Province A, so the correct recognition result obtained after the merging operation should be City B, Province A. However, due to the strong generalization ability of existing deep learning, if merging and disambiguation are not performed, the place name it identifies may be City A, Province B, which leads to ambiguity in the recognition result. Therefore, the present invention merges and disambiguates various place names based on the subordination and initial start and end positions in the initial place name information. Compared with the existing deep learning method, the present invention avoids the disadvantage that the final recognized place name does not meet the natural language rules and standard subordination due to the generalization of the learning model, and improves the accuracy of the final recognized place name.
[0068] The present invention sets a preset place name search tree and extracts the first place name that matches the place name characters stored in the node from the sentence through character matching. As a result, compared with the prior art, the present invention will not identify non-existent place names. The accuracy of the place names finally identified is improved. At the same time, by obtaining the starting and ending positions of each first place name in the sentence and merging and disambiguating the place names based on the starting and ending positions, the present invention avoids the risk of misidentification due to differences in character positions compared to the prior art, thereby improving the accuracy of the place names finally identified. Finally, by merging and disambiguating the place names based on the subordinate relationship and initial starting and ending positions in the initial place name information, the present invention avoids the disadvantage that the place names finally identified do not meet the natural language rules and standard subordinate relationships due to the generalization of the learning model, thereby improving the accuracy of the place names finally identified. It can be seen that the present invention improves the accuracy of place name recognition.
[0069] Optionally, based on the start and end position data of each first place name in the sentence, the initial start and end positions in each node information matched by each first place name in the node information group are updated to obtain the initial information group, including:
[0070] For each first place name, obtain the position data of the first and last characters of the first place name. Determine the position data of the first character as the starting position data of the first place name. Determine the position data of the last character as the ending position data of the first place name. Using the starting and ending position data, update the initial starting and ending positions in the node information matching the first place name. Determine the updated node information of the first place name as the initial place name information of the first place name.
[0071] An initial information group including a plurality of initial place name information is obtained, wherein a first place name corresponds to the initial place name information.
[0072] Optionally, in an optional embodiment of the present invention, the specific implementation method of updating the initial start and end positions may be:
[0073] Assume that the current sentence is "The weather in Chaoyang District." The place name obtained after extraction from the preset place name search tree is "Chaoyang District." In the node information of the corresponding node in the preset place name search tree, the initial start and end positions of "Chaoyang District" are zero.
[0074] In the above sentence, the starting position data of "Chaoyang District" is the first character, and the ending position data is the third character. Therefore, the initial starting and ending positions after the update are "from the first character to the third character".
[0075] Optionally, based on the initial information group, performing a first operation and a second operation on each first place name to obtain a second place group including multiple second place names includes:
[0076] For each first place name, based on the subordinate relationship identifier in the initial place name information corresponding to the first place name, it is determined whether there is a superior place name for the first place name in the initial information group. If so, the first place name is determined as the place name to be merged. If there is no superior place name for the first place name in the initial information group, the first place name is determined as the initial independent place name.
[0077] A first operation is performed on the initial place name information of each place name to be merged with a subordinate relationship to obtain a merged place name group, wherein the merged place name group includes at least one merged place name and its corresponding merged place name information, and the merged place name includes no less than two first place names.
[0078] A second operation is performed based on the merged place name group and the initial place name information of each initial independent place name to obtain a second place group.
[0079] Optionally, in an optional embodiment of the present invention, the specific implementation of obtaining the merged place name and the initial independent place name may be:
[0080] Suppose the current sentence is "How's the weather in Chaoyang District? It's really hot in Beijing today." After extracting the preset place name search tree and updating the initial start and end positions, the obtained initial information group includes two place names, "Beijing" and "Chaoyang District." The initial place name information for "Beijing" includes: "Beijing," administrative region level 1, and initial start and end positions from the tenth to the eleventh characters. The initial place name information for "Chaoyang District" includes: "Chaoyang District," administrative region level 3, administrative region level 1 of the parent place name, administrative region level 2 of the parent place name, and initial start and end positions from the first to the third characters.
[0081] The aforementioned "Chaoyang District" has two administrative district levels. In actual application scenarios, different superior administrative districts may have subordinate administrative districts with the same name. For example, "Beijing" and "Changchun" both have "Chaoyang District" as their subordinate administrative districts.
[0082] Since the administrative region level of the parent location name of "Chaoyang District" is the same as that of "Beijing," both "Chaoyang District" and "Beijing" are determined to be location names to be merged. Based on the subordinate relationship, the above first operation is performed on "Chaoyang District" and "Beijing." Furthermore, since "Beijing" is the parent location name of "Chaoyang District," after merging "Beijing" and "Chaoyang District" through the above first operation, the resulting merged location name is "Chaoyang District, Beijing."
[0083] If the initial place name information "Beijing" does not exist in the above sentence, then the above "Chaoyang District" is determined as the initial independent place name.
[0084] Optionally, performing a second operation based on the merged place name group and the initial place name information of each initial independent place name to obtain a second place group includes:
[0085] A second operation is performed on each initial independent place name: determining whether the initial start and end position interval of the initial independent place name is within the initial start and end position interval of at least one merged place name information in the merged place name group. If so, the initial independent place name and its corresponding initial place name information are deleted. If not, the initial independent place name is determined to be an independent place name.
[0086] Each merged location name and each independent location name are determined as a second location name to obtain a second location group.
[0087] It should be noted that, in actual application scenarios, there may be multiple specific implementations of the second operation, and an exemplary implementation is provided here:
[0088] Set the current sentence to "Beijing Chaoyang District and Beijing's weather". After the above processing, the current merged place name group and the initial independent point name are obtained.
[0089] The current merged place name group is set to include only one merged place name and its corresponding merged place name information. The merged place name is "Chaoyang District, Beijing." The initial start and end positions of the merged place name are set to "the first character to the fifth character."
[0090] Set the initial independent place names for the current scene to include "Beijing" and "Chaoyang District", where the initial starting and ending positions of "Beijing" are "from the seventh character to the eighth character", and the initial starting and ending positions of "Chaoyang District" are "from the third character to the fifth character".
[0091] Optionally, in an optional embodiment of the present invention, for the initial independent place name, it may be determined whether the characters of the initial independent place name exist in the characters of the merged place name.
[0092] Since the characters of "Beijing" and "Chaoyang District" both exist in the merged place name, it is determined whether the initial start and end position intervals corresponding to the initial independent place names are within the initial start and end position intervals of the merged place name information.
[0093] Clearly, the initial start and end positions of "Chaoyang District" are within the initial start and end positions of the merged place name information. The initial start and end positions of "Beijing" are not within the initial start and end positions of the merged place name information. Therefore, through the second operation described above, "Chaoyang District" and its corresponding initial place name information are deleted, and "Beijing" is determined to be an independent place name.
[0094] Optional, as above Figure 1 The illustrated method further includes:
[0095] A second operation is performed on each initial independent place name: determining whether the degree of match between the place name characters of the initial independent place name and the place name characters input in the user terminal data is greater than a preset threshold. If not, the initial independent place name and its initial place name information are deleted. If so, the initial independent place name is determined as an independent place name.
[0096] Each merged location name and each independent location name are determined as a second location name to obtain a second location group.
[0097] Optionally, in an optional embodiment of the present invention, the independent place name may be determined by:
[0098] Suppose the current sentence is "What's the weather like in Chaoyang District?" After extracting the preset place name search tree and updating the initial start and end positions, the initial place name information obtained includes: "Chaoyang District," administrative region level 3, administrative region level 1 of the parent place name, administrative region level 2 of the parent place name, and the initial start and end positions (first to third characters).
[0099] The administrative level of the parent location of "Chaoyang District" indicates that its parent locations include "Beijing" and "Changchun." The administrative level of "Beijing" is 1, and the administrative level of "Changchun" is 2.
[0100] Since there is no merged place name in the current sentence, the second operation is performed on "Chaoyang District" based on the input place name characters in the uploaded user terminal data. The types of the input place name characters include, but are not limited to, positioning data of the mobile terminal, place name search data of the mobile terminal, etc.
[0101] If the location data of the current user's mobile terminal shows that the input place name of the user's current location is "Changchun", the node information stored in the "Changchun" node is obtained from the preset place name search tree, and the first and second operations are performed on "Changchun" and "Chaoyang District". The obtained independent place name is "Changchun Chaoyang District".
[0102] Optionally, in the case of obtaining the second location group, the above Figure 1 The illustrated method further includes:
[0103] By using a preset place name completion dictionary, the affiliation of each second place name is completed according to the affiliation identifier of each second place name to obtain a final place name group.
[0104] Optionally, in an optional embodiment of the present invention, the preset place name completion dictionary can be used to complete the administrative region level of place names. By using the preset place name completion dictionary to complete place names at the administrative region level, the present invention can improve the accuracy of the ultimately recognized place names and, at the same time, accurately parse the recognized place names.
[0105] Optionally, in another optional embodiment of the present invention, the specific implementation method of completing the affiliation of each second place name according to the affiliation identifier of each second place name may be:
[0106] Assume that the name of a second location in the current second location group is "Chaoyang, Changchun, Jilin." Using the preset location name completion dictionary, the subordinate identifiers obtained for each location name are "province," "city," and "district," respectively. After performing the aforementioned subordinate relationship completion using these subordinate identifiers, the final location name obtained is "Chaoyang District, Changchun City, Jilin Province."
[0107] Corresponding to the above method embodiment, the present invention also provides a place name recognition system, such as Figure 3 As shown, the place name recognition system includes:
[0108] The first information acquisition unit 301 is used to query the nodes matching the first place names in the first place group from the preset place name search tree, extract the node information of each query node, and obtain a node information group, wherein the preset place name search tree includes multiple nodes, and the place names corresponding to the two connected nodes have a subordinate relationship, and the first place names in the first place group are extracted from the statement.
[0109] The second information acquisition unit 302 updates the initial start and end positions of each node information matched by each first place name in the node information group based on the start and end position data of each first place name in the sentence to obtain an initial information group.
[0110] The place name acquisition unit 303 performs a first operation and a second operation on each first place name based on the initial information group to obtain a second place group including a plurality of second place names.
[0111] Optionally, the second information acquiring unit 302 is configured to:
[0112] For each first place name, obtain the position data of the first and last characters of the first place name. Determine the position data of the first character as the starting position data of the first place name. Determine the position data of the last character as the ending position data of the first place name. Using the starting and ending position data, update the initial starting and ending positions in the node information matching the first place name. Determine the updated node information of the first place name as the initial place name information of the first place name.
[0113] An initial information group including a plurality of initial place name information is obtained, wherein a first place name corresponds to the initial place name information.
[0114] Optionally, the place name acquisition unit 303 is configured to:
[0115] For each first place name, based on the subordinate relationship identifier in the initial place name information corresponding to the first place name, it is determined whether there is a superior place name for the first place name in the initial information group. If so, the first place name is determined as the place name to be merged. If there is no superior place name for the first place name in the initial information group, the first place name is determined as the initial independent place name.
[0116] A first operation is performed on the initial place name information of each place name to be merged with a subordinate relationship to obtain a merged place name group, wherein the merged place name group includes at least one merged place name and its corresponding merged place name information, and the merged place name includes no less than two first place names.
[0117] A second operation is performed based on the merged place name group and the initial place name information of each initial independent place name to obtain a second place group.
[0118] Optionally, when the place name acquisition unit 303 performs the second operation based on the merged place name group and the initial place name information of each initial independent place name to obtain the second place group, it is set to:
[0119] A second operation is performed on each initial independent place name: determining whether the initial start and end position interval of the initial independent place name is within the initial start and end position interval of at least one merged place name information in the merged place name group. If so, the initial independent place name and its corresponding initial place name information are deleted. If not, the initial independent place name is determined to be an independent place name.
[0120] Each merged location name and each independent location name are determined as a second location name to obtain a second location group.
[0121] Optionally, when performing a disambiguation operation based on the merged place name group and the initial place name information of each initial independent place name to obtain the second place group, the place name acquisition unit 303 is further configured to:
[0122] A second operation is performed on each initial independent place name: determining whether the degree of match between the place name characters of the initial independent place name and the place name characters input in the user terminal data is greater than a preset threshold. If not, the initial independent place name and its initial place name information are deleted. If so, the initial independent place name is determined as an independent place name.
[0123] Each merged location name and each independent location name are determined as a second location name to obtain a second location group.
[0124] Optionally, in the case of obtaining the first location group, the above Figure 3 The illustrated place name recognition system also includes:
[0125] The place name completion unit uses a preset place name completion dictionary to complete the affiliation of each second place name according to the affiliation identifier of each second place name to obtain a final place group.
[0126] The embodiment of the present invention also provides a place name recognition device, such as Figure 4 As shown, the place name recognition device includes:
[0127] Processor 401;
[0128] The memory 402 is used to store instructions executable by the processor 401 .
[0129] The processor 401 is configured to execute instructions to implement any of the above-mentioned place name recognition methods.
[0130] An embodiment of the present invention further provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of a place name recognition device, the place name recognition device can perform any of the above-mentioned place name recognition methods.
[0131] Memory may include non-permanent memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory includes at least one memory chip. Memory is an example of a computer-readable medium.
[0132] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0134] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. It should also be noted that the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, commodity, or device comprising the element.
[0135] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.
[0136] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for identifying a place name, characterized in that: The method comprises: Searching a preset place name search tree for nodes matching each first place name in a first place group, extracting node information of each searched node, and obtaining a node information group, wherein the preset place name search tree includes a plurality of nodes, the place names corresponding to two connected nodes have a subordinate relationship, and each first place name in the first place group is extracted from a sentence; Based on the start and end position data of each first place name in the sentence, updating the initial start and end positions of each node information matched by each first place name in the node information group to obtain an initial information group; For each first place name, based on the subordinate relationship identifier in the initial place name information corresponding to the first place name, determining whether there is a superior place name of the first place name in the initial information group; if so, determining the first place name as the place name to be merged; if the superior place name of the first place name does not exist in the initial information group, determining the first place name as an initial independent place name; performing a first operation on the initial place name information of each to-be-merged place name having the subordinate relationship to obtain a merged place name group, wherein the merged place name group includes at least one merged place name and its corresponding merged place name information, and the merged place name includes no less than two first place names; Performing a second operation on each initial independent place name: determining whether an interval between the initial start and end positions of the initial independent place name is within an interval between the initial start and end positions of at least one merged place name information in the merged place name group; if so, deleting the initial independent place name and its corresponding initial place name information; if not, determining the initial independent place name as an independent place name; Each merged location name and each independent location name are determined as a second location name to obtain a second location group.
2. The method according to claim 1, characterized in that The updating of the initial starting and ending positions of each node information matched by each first place name in the node information group based on the starting and ending position data of each first place name in the sentence to obtain the initial information group includes: For each first place name, obtaining position data of the first character and the last character of the first place name; determining the position data of the first character as the starting position data of the first place name; determining the position data of the last character as the ending position data of the first place name; using the starting position data and the ending position data, updating the initial start and end positions in the node information matching the first place name; determining the updated node information of the first place name as the initial place name information of the first place name; The initial information group including a plurality of the initial place name information is obtained, wherein the first place name corresponds to the initial place name information.
3. The method according to claim 1, characterized in that Also includes: Performing the second operation on each initial independent place name: determining whether the degree of matching between the place name characters of the initial independent place name and the input place name characters in the user terminal data is greater than a preset threshold; if not, deleting the initial independent place name and its initial place name information; if so, determining the initial independent place name as an independent place name; Each merged place name and each independent place name are determined as a second place name to obtain the second place group.
4. The method according to claim 1 or 3, characterized in that When the first location group is obtained, the method further includes: By using a preset place name completion dictionary, the affiliation of each second place name is completed according to the affiliation identifier of each second place name to obtain a final place group.
5. A place name recognition system, characterized in that: The system comprises: a first information acquisition unit configured to search a preset place name search tree for nodes matching each first place name in a first place group, extract node information of each searched node, and obtain a node information group, wherein the preset place name search tree includes a plurality of nodes, the place names corresponding to two connected nodes have a subordinate relationship, and each first place name in the first place group is extracted from a sentence; A second information acquisition unit updates the initial start and end positions of each node information matched by each first place name in the node information group based on the start and end position data of each first place name in the sentence to obtain an initial information group; a place name acquisition unit configured to determine, for each first place name, whether there is a superior place name of the first place name in the initial information group based on a subordinate relationship identifier in the initial place name information corresponding to the first place name; if so, determine the first place name as a place name to be merged; if the superior place name of the first place name does not exist in the initial information group, determine the first place name as an initial independent place name; performing a first operation on the initial place name information of each to-be-merged place name having the subordinate relationship to obtain a merged place name group, wherein the merged place name group includes at least one merged place name and its corresponding merged place name information, and the merged place name includes no less than two first place names; Performing a second operation on each initial independent place name: determining whether an interval between the initial start and end positions of the initial independent place name is within an interval between the initial start and end positions of at least one merged place name information in the merged place name group; if so, deleting the initial independent place name and its corresponding initial place name information; if not, determining the initial independent place name as an independent place name; Each merged location name and each independent location name are determined as a second location name to obtain a second location group.
6. The system according to claim 5, characterized in that The second information acquisition unit is configured to: For each first place name, obtaining position data of the first character and the last character of the first place name; determining the position data of the first character as the starting position data of the first place name; Determining the position data of the last character as the ending position data of the first place name; updating the initial starting and ending positions in the node information matching the first place name using the starting position data and the ending position data; and determining the updated node information of the first place name as the initial place name information of the first place name; The initial information group including a plurality of the initial place name information is obtained, wherein the first place name corresponds to the initial place name information.
7. A place name recognition device, characterized in that: The device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the place name recognition method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of a place name recognition device, the place name recognition device is enabled to perform the place name recognition method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Identification method and system for naming entity under geographic space application, and computer program
CN108388559A
Chinese address completion method and device, equipment and storage medium
CN112256821A