File Information Extraction
Command Description
For Information Extraction of text files, the extraction template needs to be configured in the Laiye Intelligent Document Processing background
Command Prototype
arrayRet = Mage.NLPTextFileExtract(file,config,time)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
file | True | path | ''' C:\Users''' | Select the path of the text file (UTF-8 encoding) to be Information Extraction |
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
/*********************************File Information Extraction***************************************
Command Prototype:
arrayRet = Mage.NLPTextFileExtract('''C:\Users''',{},30000)
Input Parameters:
file -- Path to the file to be extracted. Default encoding format: UTF-8
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.
3. Ensure the file to be read exists locally.
********************************************************************************/
Dim arrayRet = ""
arrayRet = Mage.NLPTextFileExtract(@res"Evaluation Set - Disclosure Announcements of Listed Companies.txt",{"Pubkey":Pubkey,"Secret":Secret,"Url":"https://mage.uibot.com.cn"},30000)
TracePrint(arrayRet)