Analyzing Text with Pretrained Models

Use the pretrained models to analyze text and retrieve the results using the Language service.

    1. Open the navigation menu and click Analytics & AI. Under AI Services, click Language.
    2. In the left-side navigation menu, click Text analytics.
    3. Select the language of the text to analyze.
    4. Provide the text in the dialog box.
    5. Click Analyze.

    The results are displayed with relevant text and graphical scores and are in the pretrained models order. You can expand the individual results with the arrows.

    Click Show JSON to view, Copy, and Download the individual results. You can use Show standard results to return to the default view.

    You can reset the page by clicking Reset.

  • Use the following commands to analyze text:

    oci ai language batch-detect-language --documents [<list-of-filenames>] ... [OPTIONS]
    
    oci ai language batch-detect-entities --endpoint-id <endpoint-id> --documents [<list-of-filenames>] ... [OPTIONS]
    
    oci ai language batch-detect-key-phrases --documents [<list-of-filenames>] ... [OPTIONS]
    
    oci ai language batch-detect-sentiments --documents [<list-of-filenames>] ... [OPTIONS]
    
    oci ai language batch-detect-pii-entities --documents [<list-of-filenames>] ... [OPTIONS]
    
    oci ai language batch-detect-text-classification --endpoint-id <endpoint-id> --documents [<list-of-filenames>] ... [OPTIONS]
    

    Examples:

    oci ai language batch-detect-language --documents '[{"key": "1", "text": "hello world"}]'
    
    
    oci ai language batch-detect-entities --endpoint-id ailanguageendpoint1677089208435 --documents '[{"key": "1","languageCode": "en","text": "Lawrence Joseph 
    Ellison (born August 17, 1944) is an American business magnate and investor who is the co-founder, executive 
    chairman, chief technology officer (CTO) and former chief executive officer (CEO) of the American computer 
    technology company Oracle Corporation."}]'
    
    
    oci ai language batch-detect-key-phrases --documents '[{"key": "1","languageCode": "en","text": "Lawrence Joseph 
    Ellison (born August 17, 1944) is an American business magnate and investor who is the co-founder, executive 
    chairman, chief technology officer (CTO) and former chief executive officer (CEO) of the American computer 
    technology company Oracle Corporation."}]'
    
    
    oci ai language batch-detect-sentiments --level ASPECT --level SENTENCE --documents '[{"key": "1","languageCode": 
    "en","text": "OCI Language offers state of the art models for analyzing the text at scale with easy to use APIs and SDKs"}]'
    
    
    oci ai language batch-detect-pii-entities --masking '{"mode": "REPLACE"}'  --documents '[{"key": "1","languageCode": 
    "en","text": "Lawrence Joseph Ellison (born August 17, 1944) is an American business magnate and investor who is the 
    co-founder, executive chairman, chief technology officer (CTO) and former chief executive officer (CEO) of the American 
    computer technology company Oracle Corporation."}]'
    
    
    oci ai language batch-detect-text-classification --documents '[{"key": "1","languageCode": "en","text": "Lawrence 
    Joseph Ellison (born August 17, 1944) is an American business magnate and investor who is the co-founder, executive 
    chairman, chief technology officer (CTO) and former chief executive officer (CEO) of the American computer technology 
    company Oracle Corporation."}]'
    

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.