Extract address information
Command Description
First, loop through the address normalization command to return the result, and then extract the specified type of address information from the traversal result
Command Prototype
sRet = Mage.ExtractAddress(value, type)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
value | True | expression | value | Use loop traversal to standardize the value of address results |
type | True | enum | "whole_address" | Select the type of address to extract |
Return result
SRet, Assign the result of running the command to this variable.
Run instance
/********************** Extract Address Information **********************
Command Prototype:
sRet = Mage.ExtractAddress(value, "whole_address")
Input Parameters:
value -- Address standardization result
type -- Address type
Output Parameters:
sRet -- Variable to store the output of the function call
Important Notes:
Needs to be used in conjunction with the output results of the address standardization command (NLPAddressStandard)
****************************************************/
Rem Test data
Dim value = {"address" : "","ai_function" : "nlp_addr_std","city" : "","district" : "Pudong New Area","length" : 0,"poi_name" : "","province" : "Shanghai City","start_pos" : 0,"subdistrict" : "Zhangjiang Town"}
Dim sRet="" // Output result
sRet = Mage.ExtractAddress(value, "whole_address")
TracePrint(sRet)