CTX_ENTITY.EXTRACT and Multilingual Support (Doc ID 1309363.1)

Last updated on APRIL 11, 2011

Applies to:

Oracle Text - Version: 11.2.0.2 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Symptoms

The CTX_ENTITY.EXTRACT procedure does not found any entity from a none English document while it works fine for English ones.

CREATE TABLE docs(id number primary key, txt clob);
CREATE TABLE entities(id number primary key, ents clob);

INSERT INTO docs VALUES (1,'il dirigente si trova a milano per lavoro nella
sede della fiat mercoledi sara a firenze per un contratto di 170 milioni di euro.');
INSERT INTO docs VALUES (2,'the manager is in Milan to work at the headquarters of Fiat, Wednesday he will be in Florence for a contract of 170 million Euro.');
commit;

EXEC CTX_ENTITY.CREATE_EXTRACT_POLICY('p1');

DECLARE
rownum number;
myresults clob;
BEGIN
rownum := 1;
FOR r IN (select txt from docs) LOOP
CTX_ENTITY.EXTRACT('p1', r.txt, 'italian', myresults);
INSERT INTO entities values(rownum, myresults);
rownum := rownum + 1;
END LOOP;
COMMIT;
END;
/

set pages 999 feedback on echo on serveroutput on
set long 2000000

SELECT * FROM entities;

 ID ENTS
--- ---------------------------------------------------------------------------
  1 <entities></entities>
  2 <entities><entity id="0" offset="18" length="5"   source="SuppliedDictionary">
    <text>MILAN</text><type>city</type></entity>
    <entity id="1" offset="61" length="9" source="SuppliedDictionary">
    <text>WEDNESDAY</text><type>day</type></entity>
    <entity id="2" offset="4" length="7" source="SuppliedDictionary">
    <text>MANAGER</text><type>person_jobtitle</type></entity></entities>


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms