Extraction Functions
A set of functions to extract the numbers from text
Table of Contents
extractNumberPhrases
Syntax
Description
Extracts all Arabic number phrases from the input text. The input should be a string containing Arabic text.
Parameters
text
(string) - The input Arabic text to extract number phrases from.
Returns
array
- An array of strings containing all Arabic number phrases extracted from the input text.
Example
extractNumberContext
Syntax
Description
Extracts all Arabic number phrases from the input text, along with their surrounding context (the preceding and following words). The input should be a string containing Arabic text.
Parameters
text
(string) - The input Arabic text to extract number phrases and their context from.
Returns
array
- An array of arrays containing the preceding word, the number phrase, and the following word for each extracted number phrase.
Example
Last updated