Entity Extraction

Using Google’s entity extraction APIs, DocumentScanner can identify and enable the appropriate action for entities such as addresses, phone numbers, and more.

extractEntities 

To enable entity extraction, set the extractEntities boolean to true.

entityExtractionLanguageCode 

To specify the language, identify one of the supported languages in Google’s Entity Extraction ML Kit. Then, set entityExtractionLanguageCode to the corresponding language code in the ML Kit language identification doc. By default, the language is set to "en" for English.

Sample Configuration 

1const myScanner = getDocumentScanner();
2    if (myScanner.isAvailable()) {
3      const options = {
4        imageSource: imageSource,
5        scriptHint: "LATIN",
6        returnImageBytes: true,
7        extractEntities: true,
8        entityExtractionLanguageCode: "NL",
9      };