Text information extraction
Command Description
For Information Extraction of text, the extraction template needs to be configured in the background of Laiye Intelligent Document Processing
Command Prototype
arrayRet = Mage.NLPTextExtract(doc,config,time)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
doc | True | expression | "" | Input the text to be extracted. If "Default Line Break End Matching" is enabled in the extractor settings of Laiye Intelligent Document Processing, the model will first split the text through \ n before matching |
config | True | expression | {} | Laiye Intelligent Document Processing Call Configuration |
time | True | number | thirty thousand | Specify the waiting time (in milliseconds), and if it exceeds this time, an exception will be raised. Default 30000 milliseconds (30 seconds) |
Return result
ArrayRet, Assign the result of running the command to this variable.
Run instance
/*********************************Text Information Extraction***************************************
Command Prototype:
arrayRet = Mage.NLPTextExtract("",{},30000)
Input Parameters:
doc -- Text to be extracted. Note: Input the text to be extracted. If "Default newline ends matching" is enabled in the Laiye Intelligent Document Processing extractor settings, the model will first split the text by \n before performing matching.
config -- Mage configuration. Configuration includes: Pubkey, Secret, Url, where Pubkey and Secret need to be obtained from the specified model in Mage. Type: Dict
time -- Timeout (milliseconds). Note: Specify the wait time (in milliseconds). If this time is exceeded, an exception will be thrown. Default is 30000 ms (30 seconds)
Output Parameter:
arrayRet -- The variable where the output of the function call will be saved.
Notes:
1. To use Mage, ensure network connectivity is available.
2. Mage has usage limits, pay attention to the remaining quota.
********************************************************************************/
Dim arrayRet = ""
arrayRet = Mage.NLPTextExtract("Announcement 1: Mr. Zhang Yan, Deputy General Manager and Board Secretary, who holds 876,000 shares of the company (accounting for 0.0829% of the company's total share capital), plans to reduce his holdings by no more than 200,000 shares (accounting for 0.0189% of the company's total share capital) through centralized bidding or block trading within six months starting from fifteen trading days after this announcement. Announcement 2: Ms. Chen Yuanyuan, Deputy General Manager and CFO, who holds 885,000 shares of the company (accounting for 0.0838% of the company's total share capital), plans to reduce her holdings by no more than 206,000 shares (accounting for 0.0195% of the company's total share capital) through centralized bidding or block trading within six months starting from fifteen trading days after this announcement.",{"Pubkey":Pubkey,"Secret":Secret,"Url":"https://mage.uibot.com.cn"},30000)
TracePrint(arrayRet)