As a result of different languages

Hello! I have a table with a text column with texts of store on different languages.
There are some things I want to know:
(1) there is no language column in the table base (with presentation of the chain), but there is the column with the language id (FK), so I have a link with the language table where I put the names of languages for oracle.
Can I use cross lexer with this language ID column?
(2) I intend to use lexer auto and specify the query language setting for each query nls_language, that I wanted to do or in the query pattern. So I create indexes in this way:

Start:
ctx_ddl.create_statement ('my_lexer', 'auto_lexer');
ctx_ddl.set_attribute ('my_lexer', 'index_stems', 'Yes');
end;

create indexes my_index on my_table (colonne_texte)
indexType is ctxsys.context
parameters ("lexer my_lexer");

After that, I tried to query:
SELECT count (*) FROM my_table WHERE CONTAINS (colonne_texte, '$sing') > 0;
SELECT count (*) FROM my_table WHERE CONTAINS (colonne_texte, '$sang') > 0;
SELECT count (*) FROM my_table WHERE CONTAINS (colonne_texte, '$sung') > 0;

I supposed to get the same count for each SELECT, but each time it was different.
So what I am doing wrong?

(3) what is the difference between auto_lexer and world_lexer?
According to the literature, two of them are used for indexing the columns that contain documents of different languages and using automatic detection.

(1) there is no language column in the table base (with presentation of the chain), but there is the column with the language id (FK), so I have a link with the language table where I put the names of languages for oracle.
Can I use cross lexer with this language ID column?

Ctx_ddl.add_sub_lexer has a fourth parameter to a different value for the language. You can use your language and in your creation of index IDs, but it must be character, not text. Alternatively, you can create a materialized view that converts a numeric value to text and create your index on it.

(2) I intend to use lexer auto and specify the query language setting for each query nls_language, that I wanted to do or in the query pattern. So I create indexes in this way:

Start:
ctx_ddl.create_statement ('my_lexer', 'auto_lexer');
ctx_ddl.set_attribute ('my_lexer', 'index_stems', 'Yes');
end;

create indexes my_index on my_table (colonne_texte)
indexType is ctxsys.context
parameters ("lexer my_lexer");

After that, I tried to query:
SELECT count (*) FROM my_table WHERE CONTAINS (colonne_texte, '$sing') > 0;
SELECT count (*) FROM my_table WHERE CONTAINS (colonne_texte, '$sang') > 0;
SELECT count (*) FROM my_table WHERE CONTAINS (colonne_texte, '$sung') > 0;

I supposed to get the same count for each SELECT, but each time it was different.
So what I am doing wrong?

Use a list of words with the set of attributes of generator stemmers for the automobile, instead of setting the index_stems attribute in a lexer. If you use the derived forms and index_stems generator, it uses index_stems and not the derived forms generator, so make sure that you do not use index_stems, to avoid the conflict.

(3) what is the difference between auto_lexer and world_lexer?
According to the literature, two of them are used for indexing the columns that contain documents of different languages and using automatic detection.

Auto_lexer is new to 11g and has several attributes and characteristics. World_lexer is still provided for backward compatibility, so that the code that was written before 11g and uses it to run.

I presented a demo below, using some of the discussed methods. I have also added filter by lang_id and surlabasedesdonneesdufabricantduballast to improve performance when the limitation of requests for specific languages.

SCOTT@orcl_11gR2> CREATE TABLE lang_tab
  2    (lang_id   VARCHAR2 ( 1) PRIMARY KEY,
  3       language  VARCHAR2 (30))
  4  /

Table created.

SCOTT@orcl_11gR2> INSERT ALL
  2  INTO lang_tab VALUES (1, 'ENGLISH')
  3  INTO lang_tab VALUES (4, 'FRENCH')
  4  INTO lang_tab VALUES (5, 'GERMAN')
  5  INTO lang_tab VALUES (7, 'SPANISH')
  6  SELECT * FROM DUAL
  7  /

4 rows created.

SCOTT@orcl_11gR2> CREATE TABLE my_table
  2    (lang_id      VARCHAR2 (1) REFERENCES lang_tab,
  3       text_column  CLOB)
  4  /

Table created.

SCOTT@orcl_11gR2> INSERT ALL
  2  INTO my_table VALUES (1, 'I will sing a song.')
  3  INTO my_table VALUES (1, 'I sang a song.')
  4  INTO my_table VALUES (1, 'Many songs were sung.')
  5  INTO my_table VALUES (4, 'Je vais chanter une chanson.')
  6  INTO my_table VALUES (4, 'J''ai chanté une chanson.')
  7  INTO my_table VALUES (4, 'Beaucoup de chansons ont été chantées.')
  8  INTO my_table VALUES (5, 'Ich werde ein Lied singen.')
  9  INTO my_table VALUES (5, 'Ich sang ein Lied.')
 10  INTO my_table VALUES (5, 'Viele Lieder wurden gesungen.')
 11  INTO my_table VALUES (7, 'Voy a cantar una canción.')
 12  INTO my_table VALUES (7, 'Me cantó una canción.')
 13  INTO my_table VALUES (7, 'Muchas canciones fueron cantadas.')
 14  SELECT * FROM DUAL
 15  /

12 rows created.

SCOTT@orcl_11gR2> BEGIN
  2    CTX_DDL.CREATE_PREFERENCE ('english_lexer', 'basic_lexer');
  3    CTX_DDL.CREATE_PREFERENCE ('french_lexer', 'basic_lexer');
  4    CTX_DDL.CREATE_PREFERENCE ('german_lexer', 'basic_lexer');
  5    CTX_DDL.CREATE_PREFERENCE ('spanish_lexer', 'basic_lexer');
  6    CTX_DDL.CREATE_PREFERENCE ('my_lexer', 'multi_lexer');
  7    CTX_DDL.ADD_SUB_LEXER ('my_lexer', 'default', 'english_lexer');
  8    CTX_DDL.ADD_SUB_LEXER ('my_lexer', 'french', 'french_lexer', '4');
  9    CTX_DDL.ADD_SUB_LEXER ('my_lexer', 'german', 'german_lexer', '5');
 10    CTX_DDL.ADD_SUB_LEXER ('my_lexer', 'spanish', 'spanish_lexer', '7');
 11    CTX_DDL.CREATE_PREFERENCE ('my_wordlist', 'basic_wordlist');
 12    CTX_DDL.SET_ATTRIBUTE ('my_wordlist', 'stemmer', 'auto');
 13  END;
 14  /

PL/SQL procedure successfully completed.

SCOTT@orcl_11gR2> CREATE INDEX my_index ON my_table (text_column)
  2  INDEXTYPE IS CTXSYS.CONTEXT
  3  FILTER BY lang_id
  4  PARAMETERS
  5    ('LEXER            my_lexer
  6        LANGUAGE COLUMN  lang_id
  7        WORDLIST       my_wordlist')
  8  /

Index created.

SCOTT@orcl_11gR2> COLUMN text_column FORMAT A45
SCOTT@orcl_11gR2> SELECT * FROM my_table
  2  WHERE  CONTAINS (text_column, '$sing AND SDATA (lang_id = "1")') > 0
  3  /

L TEXT_COLUMN
- ---------------------------------------------
1 I will sing a song.
1 I sang a song.
1 Many songs were sung.

3 rows selected.

SCOTT@orcl_11gR2> SELECT * FROM my_table
  2  WHERE  CONTAINS (text_column, '$sang AND SDATA (lang_id = "1")') > 0
  3  /

L TEXT_COLUMN
- ---------------------------------------------
1 I will sing a song.
1 I sang a song.
1 Many songs were sung.

3 rows selected.

SCOTT@orcl_11gR2> SELECT * FROM my_table
  2  WHERE  CONTAINS (text_column, '$sung AND SDATA (lang_id = "1")') > 0
  3  /

L TEXT_COLUMN
- ---------------------------------------------
1 I will sing a song.
1 I sang a song.
1 Many songs were sung.

3 rows selected.

SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'FRENCH'
  2  /

Session altered.

SCOTT@orcl_11gR2> SELECT * FROM my_table
  2  WHERE  CONTAINS (text_column, '$chanter AND SDATA (lang_id = "4")') > 0
  3  /

L TEXT_COLUMN
- ---------------------------------------------
4 Je vais chanter une chanson.
4 J'ai chanté une chanson.
4 Beaucoup de chansons ont été chantées.

3 rows selected.

SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
  2  /

Session altered.

SCOTT@orcl_11gR2> SELECT * FROM my_table
  2  WHERE  CONTAINS (text_column, '$singen AND SDATA (lang_id = "5")') > 0
  3  /

L TEXT_COLUMN
- ---------------------------------------------
5 Ich werde ein Lied singen.
5 Ich sang ein Lied.
5 Viele Lieder wurden gesungen.

3 rows selected.

SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'SPANISH'
  2  /

Session altered.

SCOTT@orcl_11gR2> SELECT * FROM my_table
  2  WHERE  CONTAINS (text_column, '$cantar AND SDATA (lang_id = "7")') > 0
  3  /

L TEXT_COLUMN
- ---------------------------------------------
7 Voy a cantar una canción.
7 Me cantó una canción.
7 Muchas canciones fueron cantadas.

3 rows selected.

SCOTT@orcl_11gR2>

Tags: Database

Similar Questions

  • Lock screen showing Hello in different languages

    I woke up during the night and clicked my iPhone5 on the top button to see the time and the screen is different that usual, he says hello and if I do not drag, he goes to different languages, one after the other. I slipped to the right put my unlock code and I need to choose a network and correct is already ticked so I click Next, then there is an Activate iPhone message want me to my ID Apple and the password. Is - this sound normal?

    My details are all in the phone before going to bed, then is - it safe to put these details in and continue?

    You update the phone before?

    It looks like the program for setting up the phone, and you will need to fill in all the details to put the phone back to work again.

  • Two different language versions of Firefox at the same time?

    I am running Windows 7 Home Premium. I have two accounts, one for me and one for my wife. She uses Firefox (Japanese), and I've been using another browser. But I would like to firstly using Firefox (in English).

    Is it possible to run two different language versions of Firefox on the same computer? I want to be able to run both at the same time... (So if I navigate and she wants to check an auction quickly it can without my duty close my browser).

    Can be done with relative ease?

    Make sure that each of you has their own Firefox profile folder.

    See:

    You can add - no.-distance to the command line to open another instance of Firefox with its own profile and run multiple instances of Firefox at the same time.

  • the bar of menus in itunes is in a different language.  All the rest in English, but the bar menu is in Chinese

    the bar of menus in itunes is in a different language.  All the rest in English, but the bar menu is in Chinese.  How can I change it back to English.  I bought something when my vpn has been connected to Singapore and the menu bar has changed after

    CTRL + , < comma > to display the Preferences dialog box, the tab the leftmost is General, the drop-down list language is located at the bottom of the dialog box, English UK and English American are the ninth and tenth entries in the list, respectively. The OK button is the second from the bottom right. Close iTunes and reopen it to apply.

    Or, see change the language you see in iTunes - Apple Support.

    TT2

  • Accidentally, I chose different language that I don't understand on Apple TV. How can I go back to this first stage in?

    Accidentally, I chose different language that I don't understand on Apple TV.

    How can I return to the language selection?

    See change the language on your Apple TV - Apple Support.

    TT2

  • How can I dictation in 2 different languages?

    I have conversations of messages with friends from different countries and different languages. How can I use dictated in different languages?

    Hello

    On your Apple Watch, after tapping on answer, press firmly on the screen, and then tap on choose language to a different language for your reply (including the dictation).

    The default language for any given conversation is on the same language as the active keyboard on your iPhone (in Messages) for this particular conversation. When you change the language of the keyboard for this conversation on your iPhone, it also changes on your Apple Watch.

    To change the language for a chat on your iPhone (and also on your watch):

    • Lock your iPhone (press the Sleep / Wake button briefly).
    • Open the conversation with this contact on your watch and press on answer.
    • On your iPhone, press the Sleep / Wake button briefly to display the lock screen.
    • The lower left corner of the lock screen, drag upward on the Messages icon (where transfer icons appear).
    • This will open this conversation in Messages on your iPhone.
    • Press the symbol of the globe by the SPACEBAR on the keyboard of the iPhone and choose your preferred language.
    • Start typing a response on your iPhone (one or more characters), then delete (implements the choice of language of keyboard for this conversation).
    • On your watch, in the Messages application, exit the screen to answer.
    • Start a new response when this conversation - the new language will be used for dictation and short answers in this conversation.

    More information:

    Use Dictation on your Apple Watch - Apple Support

  • The Windows Easy Transfer of data application does not work if there are two windows of different language.

    I bought a data transfer cable and I tried to make a transfer of data from the laptop with non - English Windows XP Profesional a laptop with Windows 7 Home via WINDOWS EASY TRANSFER viz English.

    http://Windows.Microsoft.com/en-us/Windows7/products/features/Windows-easy-transfer
    but I was surprised that I got a message "that a different language to the windows version has been so that data transfer can not live there. And above all, there was a message "that the data cable has not been detected."
    Microsoft is working with so many language versions, then why this simple problem is not solve upward? It cannot be too big problem to compensate for a versatile application that would work on all versions of Windows.

    No, it doesn't work of course between the various language versions, has never and will never be.  Will not be fixed either, because Windows XP is in the extended now support (only security patches issued) and becomes entirely non supported in about a year.  Save and move documents using a different method.

  • EventLog in English while the operating system is in a different language

    Hi, I support a lot of different PC in several countries. Each country uses its own version of Windows XP - Czech, Slovak, Poland... Someone told me, there is a way - probably by changing some dll files - how to have Eventlog in English, while the operating system itself is in a different language. I tried searching, but have not been successful so far.

    If anyone knows how to solve this problem, I would be very gratefull

    Hello Tomas_V,

    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the MSDN forum on. Following your question thanks for posting the link below:

    http://social.msdn.Microsoft.com/forums/en-us/categories

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • Switch keyboard blackBerry 10 between different languages

    Does anyone know if the keyboard BB10 will feature an easy switch between the different languages that will preserve the anticipation of the frequently used words / etc?

    nouaspe wrote:

    It is very good - thank you very much. What is a basic characteristic? Is there a list of the languages (if you seek one with less traffic)?

    in the input languages, there is a list of language to activate, and then it will work immediately

  • I want to uninstall a program nunkown read on different language

    I want to uninstall an unknown program but I don't know how because it is completely visualized in a different language sponsored by kingsoft internet security which is the link to ijinshan.com. I think this program automatically downloaded when I try to uninstall KMP player. I don't know what to do anymore. I really want to uninstall this program to free up space.

    Hello

    You want to uninstall the program installed on your computer automatically unknown.

    I suggest you follow the steps in the link to uninstall the program from the link and check if the problem persists.

    Uninstall or change a program

    http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-program

    For reference:

    If the problem persists, I suggest you to contact Kingsoft Internet Secuirty for assistance.

    http://www.kingsoftsupport.com/index.html

    I hope this helps.

  • Landing page for the different language in LMS options

    I need to create a landing page with options for different language for the same course that can be loaded as a single LMS-ready package.

    My solution was to create the same in each language, export in the .exe and then create an exceptional Captivate file with links to each of the languages as 'open file/URL', but I've known errors trying to do.

    I saw a person offers to write an HTML index page which links to each. I like the idea of this, but I don't know how it worked in a LMS System.

    Another idea would be to create a single Captivate project as described here: Options multilingual in a single course with Adobe Captivate 5.5 "Rapid e-Learning | Adobe Captivate Blog - but the inability to locate the bar reading/table of contents in each language, I avoid it.

    What are my options here?

    The easiest way to do this is to create a main project folder and publish all your projects DSL SCORM in specific folders, do not publish for zip.

    You create an html page that has links to specific language folders or a non-SCORM project. We could call this menu.html.

    Now you need some SCORM files.

    You need an imsmanifest.xml file to create the LMS link to your menu.html and a metadata.xml with title and description.

    We actually already have structures with the manifest and SCORM files already set up to do this associate.

    The manifest looks like this:

    xmlns = "http://www.imsproject.org/xsd/imscp_rootv1p1p2."

    xmlns:adlcp = "http://www.adlnet.org/xsd/adlcp_rootv1p2".

    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".

    xsi: schemaLocation = "http://www.imsproject.org/xsd/imscp_rootv1p1p2 imscp_rootv1p1p2.xsd".

    http://www.imsglobal.org/XSD/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd

    http://www.adlnet.org/XSD/adlcp_rootv1p2 adlcp_rootv1p2.xsd ">

    ADL SCORM

    1.2

    Metadata.Xml

    ENTER THE TITLE OF YOUR COURSE

    ENTER THE TITLE OF THE LESSON HERE

    You can contact us if you need help to put it together.

  • Question: What is the best way to make a web site in different languages

    I've published a site in Swedish, and now I want to do it in English. Any ideas?

    Hello

    Please check the following threads

    How to set up a multilingual with Adobe Muse website and push it live Adobe Business Catalyst

    How can I create a multilingual website?

    How can I create different languages for my page?

    Re: Multilingual Site

  • Search feature with several web languages production results in all languages

    I have a question where web search in my outings with several languages results in all languages. For example, if the user enters a word that can appear in all the outputs regardless of the language, the results will display all HTML pages for each language when it appears.

    Is it possible to set up the web output so that if the user displays the English content, only the HTML pages in English are displayed when you use the search function?

    Thank you

    Chris

    Hello

    Personally, I doubt that a patch would solve the problem. Maybe it will be, and it is certainly worth a try, but don't be too shocked if you find that you must apply the service release and nothing changes.

    My own experience (as my little finger) is whispering in my ear (or abdomen) that probably is simple settings, that you set up before and during the build.

    I didn't know any reference to the version of RoboHelp you use here, so I'll use version 11 because it is likely the most common version used at the moment. And if you have 10 or 9 or even 2015 release, the steps should be almost identical.

    When you examine the presentation of single Source settings, expand your content categories and select one. Note that for each of them, you have an opportunity to choose a conditional Expression to build.

    I say this because if a conditional build expression causes points to not appear in the output, the elements must also not appear in the search.

    My thought here, you need to configure some conditional tags to build carefully, then associate tags with subjects that do not apply to each category. Thus, for English subjects, create and associate a label named "English". Same thing for the other languages. When you prepare to generate, consider each of the categories, click on this button to set and exclude the languages that do not apply. So if you have four languages, English, Spanish, French and German, maybe, and your category is for English, you would create a create an Expression that looks like this:

    Give it a go and see how you rate.

    See you soon... Rick

  • text in a different language

    Why my text appears in a different language, and how can I change?

    Looks like a problem of police with the file. Can share you it?

    In any case there is probably nothing you can do about it with the player. You should contact the authors of the file and report the problem to them.

  • Hello. How to link two different language site

    For example, I built two different Web site in English and Somali that work together. If someone who has read the Somalis can go to the pages of Somali somali Web site or someone who reads English can go to the English pages on the English site, so please is there anyone can help with this situation?

    Hello

    Please check the following threads,

    How to set up a multilingual with Adobe Muse website and push it live Adobe Business Catalyst

    Re: How can I create different languages for my page?

    I hope this helps. Let me know if you have any question.

Maybe you are looking for