Need to search for words with similar meaning

HI,
I want to search for words which are similar in meaning,
for example, search with the keyword LIME should give LIME , LEMON etc.
Can it be done using the inbuilt thesaurus?

I don't know how similar the example that you provided is to your actual problem.  Synonyms are not the only relations that you can set.  You an also use related terms and hierarchies using broader and narrower terms.  In the following example, I have created citrus as a broader term and created lemon, lime, and orange as narrower terms underneath citrus.  I have them demonstrated how you can query to return all items from the same category that lemon is in, by first finding the broader term citrus above it, then searching for all narrower terms underneath that.  I have included some intermediary results that you don't need to run, just for better understanding of how the query is formed.
SCOTT@orcl12c> create table test_tab
  2    (test_col  varchar2(60))
  3  /
Table created.
SCOTT@orcl12c> insert all
  2  into test_tab values ('lemon')
  3  into test_tab values ('lime')
  4  into test_tab values ('orange')
  5  into test_tab values ('toaster oven')
  6  select * from dual
  7  /
4 rows created.
SCOTT@orcl12c> create index test_tab_idx on test_tab (test_col) indextype is ctxsys.context
  2  /
Index created.
SCOTT@orcl12c> begin
  2    ctx_thes.create_thesaurus ('test_thes');
  3    ctx_thes.create_relation ('test_thes', 'lemon', 'bt', 'citrus');
  4    ctx_thes.create_relation ('test_thes', 'lime', 'bt', 'citrus');
  5    ctx_thes.create_relation ('test_thes', 'orange', 'bt', 'citrus');
  6  end;
  7  /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> variable g_search varchar2(100)
SCOTT@orcl12c> exec :g_search := 'lemon'
PL/SQL procedure successfully completed.
SCOTT@orcl12c> select ctx_thes.bt (:g_search, 1, 'test_thes') from dual
  2  /
CTX_THES.BT(:G_SEARCH,1,'TEST_THES')
{LEMON}|{CITRUS}
1 row selected.
SCOTT@orcl12c> select 'nt(' ||
  2            replace (ctx_thes.bt (:g_search, 1, 'test_thes'), '|', ', 1, test_thes)|nt(')
  3            || ', 1, test_thes)'
  4  from  dual
  5  /
'NT('||REPLACE(CTX_THES.BT(:G_SEARCH,1,'TEST_THES'),'|',',1,TEST_THES)|NT(')||',
nt({LEMON}, 1, test_thes)|nt({CITRUS}, 1, test_thes)
1 row selected.
SCOTT@orcl12c> select * from test_tab
  2  where  contains
  3            (test_col,
  4            'nt(' ||
  5            replace (ctx_thes.bt (:g_search, 1, 'test_thes'), '|', ', 1, test_thes)|nt(')
  6            || ', 1, test_thes)') > 0
  7  /
TEST_COL
lemon
lime
orange
3 rows selected.

Similar Messages

  • CONTAINS and searching for words with an apostrophe

    I have a CONTEXT index in place, and I'm trying to search for the word
    JOHN'SHow do you go about going that, I tried both
    JOHN'S
    JOHNSand neither worked.
    --=Chuck

    How are you doing your search?
    SQL> create table test1 (
      2  a1 number,
      3  a2 varchar2(20));
    Table created.
    SQL> insert into test1 select level, 'Line '||level from dual connect by level < 500;
    499 rows created.
    SQL> insert into test1 values (1000, 'JOHN''S');
    1 row created.
    SQL> create index context_index on test1 (a2) indextype is ctxsys.context;
    Index created.
    SQL> select * from test1
      2  where contains (a2, 'JOHN''S') > 0;
            A1 A2
          1000 JOHN'S
    SQL> select * from test1
      2  where contains (a2, 'JOHNS') > 0;
    no rows selected
    SQL> select * from test1
      2  where contains (a2, 'JOHN') > 0;
            A1 A2
          1000 JOHN'S

  • Searching for words with dot  in the context index.

    Hi ,
    We have a context index that uses a following BASIC_LEXER
    drop_preference (c_lexer_pref);
    ctx_ddl.create_preference(c_lexer_pref, 'basic_lexer');
    ctx_ddl.set_attribute(c_lexer_pref, 'base_letter', 'YES');
    ctx_ddl.set_attribute(c_lexer_pref, 'whitespace', '()"`/');
    ctx_ddl.set_attribute (c_lexer_pref, 'index_stems', 'english');
    When user searches for "OAR" , oracle does not find "O.A.R'"
    Can someone help me understand why oracle is not able to find the "O.A.R" when OAR is being searched.
    Thanks for your help.

    You need to use skipjoins to tell it to skip the periods, as shown below.
    scott@ORA92> drop table your_table
    2 /
    Table dropped.
    scott@ORA92> exec ctx_ddl.drop_preference ('c_lexer_pref')
    PL/SQL procedure successfully completed.
    scott@ORA92> begin
    2 ctx_ddl.create_preference ('c_lexer_pref', 'basic_lexer');
    3 ctx_ddl.set_attribute ('c_lexer_pref', 'base_letter', 'YES');
    4 ctx_ddl.set_attribute ('c_lexer_pref', 'whitespace', '()"`/');
    5 ctx_ddl.set_attribute ('c_lexer_pref', 'index_stems', 'english');
    6 ctx_ddl.set_attribute ('c_lexer_pref', 'skipjoins', '.');
    7 end;
    8 /
    PL/SQL procedure successfully completed.
    scott@ORA92> create table your_table
    2 (your_column varchar2(30))
    3 /
    Table created.
    scott@ORA92> insert into your_table values ('OAR')
    2 /
    1 row created.
    scott@ORA92> insert into your_table values ('O.A.R')
    2 /
    1 row created.
    scott@ORA92> create index your_index
    2 on your_table (your_column)
    3 indextype is ctxsys.context
    4 parameters ('lexer c_lexer_pref')
    5 /
    Index created.
    scott@ORA92> select * from your_table
    2 where contains (your_column, 'OAR') > 0
    3 /
    YOUR_COLUMN
    O.A.R
    OAR
    scott@ORA92>

  • Do you know a reader app in which I can search for words?

    Do you know a reader app in which I can search for words? I mean which can open .doc files and i can search for specific words in the full text! Thanks!

    I am not aware of any such fix.  If you are concerned, apply a screen protector.

  • I need autocomplete  for search for words in a txt. file

    i am not so good in java.
    I have a running code for search in text with a txt. file (from user bluefox815).
    But I need a solution with autocomplete for search for words in a txt. file.
    test_file.txt (Teil des Inhaltes):
    Roboter robots
    Mechatronik mechatronics
    and so on
    Can you help me please.
    Here is the code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    * this program searches for a string in a text file and
    * says which line it found the string on
    public class SearchText implements ActionListener {
    private String filename = "test_file.txt";
    private JFrame frame;
    private JTextField searchField;
    private JButton searchButton;
    private JLabel lineLabel;
    private String searchFor;
    private BufferedReader in;
    public SearchText() {
    frame = new JFrame("SearchText");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    searchField = new JTextField(80);
    searchButton = new JButton("Search");
    // this is used later in our actionPerformed method
    searchButton.setActionCommand("search");
    // this sets the action listener for searchButton, which is the current class
    // because this class implements ActionListener
    searchButton.addActionListener(this);
    lineLabel = new JLabel("nach dem Fachbegriff suchen");
    public void createGUI() {
    JPanel topPanel = new JPanel();
    topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.X_AXIS));
    JPanel bottomPanel = new JPanel();
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
    topPanel.add(searchField);
    topPanel.add(searchButton);
    bottomPanel.add(lineLabel);
    mainPanel.add(topPanel);
    mainPanel.add(bottomPanel);
    frame.getContentPane().add(mainPanel);
    frame.pack();
    frame.setVisible(true);
    public void actionPerformed(ActionEvent e) {
    // now we get the action command and if it is search, then it is the button
    if ("search".equals(e.getActionCommand())) {
    searchFor = searchField.getText();
    searchTheText();
    private void searchTheText() {
    // I initialize the buffered reader here so that every time the user searches
    // then the reader will start at the beginning, instead of where it left off last time
    try {
    in = new BufferedReader(new FileReader(new File(filename)));
    } catch (IOException e) {
    String lineContent = null;
    int currentLine = 0;
    // this will be set to true if the string was found
    boolean foundString = false;
    while (true) {
    currentLine++;
    // get a line of text from the file
    try {
    lineContent = in.readLine();
    } catch (IOException e) {
    break;
    // checks to see if the file ended (in.readLine() returns null if the end is reached)
    if (lineContent == null) {
    break;
    if (lineContent.indexOf(searchFor) == -1) {
    continue;
    } else {
    lineLabel.setText(String.valueOf(lineContent));
    foundString = true;
    break;
    if (!foundString)
    lineLabel.setText("Es kann kein Fachbegriff gefunden werden.");
    try {
    in.close();
    } catch (IOException ioe) {
    public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    new SearchText().createGUI();
    }

    Markus1 wrote:
    But I need a solution with autocomplete for search for words in a txt. file.What is your question? What have you tried so far? What are you having difficulty with?
    Mel

  • Searching for words in Album names

    My iPhoto search function is unable to find words that are in the names of newly-created Albums. It can find words in the names of albums I created some time back but not in new one.
    This is what I do:
    1) Select several photos.
    2) Push the plus sign to create a new album.
    3) Give the album a unique name like "dazzler"
    4) Select the tab to view all photos in the library.
    6) Do a search for "dazzler", but nothing comes up.
    Very strange.
    If I search for words in libraries I created a week ago, they show up fine.
    I've already reindexed Spotlight, restarted, and tried various other general things, all to no avail. Any advice would be appreciated.
    Thanks,
    Matthew

    I can confirm your problem. Report the bug at http://www.apple.com/feedback/iphoto.html as will I.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Search for word/phrase by ctrl+shift+F

    ctrl+shift+F
    One can enter here  the file/folder path the search for word/phrase should be made.
    But length of this control element is really limited.
    If the chosen path is very long, with lot of folder levels, longer than the control element is capable to show it,
    the path string is truncated. Truncation in its middle part.
    Nobody is able to see how exactly the path is, after it has been shortened.
    And now, please imagine that there are several similar paths on the disc.
    They differ by theirs middle section only.
    Now assume the search needs 3 hours.
    1. After 3 hours of search run user can't say which folder of all similar folders he has chosen for last search operation.
    After search completes user is no able to check, which path the search ran in.
    2. If new search in some other folder but in a folder located close to the previous one is aimed  the user
    has to follow the whole path from the disc root - job intensive task.
    Adobe Reader should use the previous search path as start point of new search path selection.
    The full-feature product Adobe Acrobat probably also affected.

    Hi vmartin01,
    I tried to check at my end and it works fine at my end.
    Regards,
    Ajlan Huda.

  • I have a macbook pro 15 inch mid 2012 and I want to change the hard drive, what specifications do I need to search for?

    I have a macbook pro 15 inch mid 2012 and I want to change the hard drive, what specifications do I need to search for?

    Does a Seagate - 1TB Internal Serial ATA III/Serial ATA II Solid State Hybrid Drive for Laptops - Multi with the following specifications may work??
    Height
    4 inches
    Width
    2.75 inches
    Weight
    3.5 ounces
    Color Category
    Multi
    Minimum System Requirements
    PC: Windows XP, Vista, 7 or 8; MacBook®, MacBook Pro or Mac Mini: Intel®
    processor; OS X; Linux; internal Serial ATA III or Serial ATA II support

  • Unable to search for words in a pdf document

    I am using Adobe Reader Ver 10.1.1 (All updates)
    I have a pdf document in which I am unable to search for words. No words in the document are found even though they do exist. If I copy a word from within the document and paste it into the search criteria then instead of getting the word that I copied, I get substitute characters and it can in fact find these characters as the word being searched.
    The document is a catalog and can be downloaded from the following URL.
    http://www.carbatec.com.au/getcatalogue?zenid=d1cuvbat0ois0g37r0r33vnah1
    I will appreciate any help as to why I cannot search for words in the document.

    Thank you Dave Merchant and try67 for your responses. As per my previous post, I contacted the company re the catalogue and they have responded favourably. I'll include their response because it gives the reason for the search failure as document compression which you might find interesting. I'll await their new catalogue and see if they have fixed the problem.
    Company response:
    Thank you very much for your input.  And yes, you are correct, the compression we used for the current catalogue's PDF format does strip out text included in the catalogue.  We used the compression settings we did with the intention of minimising download time, however I take your point about including text for search purposes (which I also utilise when I'm scanning through PDFs).
    We will actually be posting out our new catalogue next week and we'll release the new PDF version on the website at the same time.  I've asked our graphic designer to ensure that the PDF we use for the new catalogue includes searchable text.

  • Can't search for words anymore after saving PDFs in Preview

    Hi everyone,
    I would love to use Preview for my day-to-day use of previewing PDFs + highlighting + setting annotations. However, once I have saved the pdf with Preview I can not search for words anymore. If I search for one letter only, I would get cryptic hits like "7;%! 2%8%P%8!".
    I am not sure, but I guess when preview saves the pdf using a Quartz PDF context, something happens with the index, or the underlying the font structuring.
    Does anyone have had experience with these kinds of troubles?
    Thanks in advance,
    Heinrich

    Hi, thanks for answering quickly, and the heads up on that other thread.
    It undoubtedly has to do with the annotations or mark ups (the last, in my case).
    In the linked-to thread they end by suggesting that it's because it's has "commenting not allowed" when you see it
    using Adobe Reader, File > Properties > Security says Commenting: Not Allowed.
    However, some documents with "commenting not allowed set in Adobe Reader I can highlight or annotate fine, without it messing up after saving.
    Besides, any document I save as pdf even from Word, will say commenting not allowed in Adobe Reader. So if even my own documents are not highlight- or annotate-able without garbling the text, what documents would these functions be for, then?
    I think what somebody mentioned in the other thread about character encodings hold some truth, I see it in documents in Danish with æ ø and å (however, not all!), but not in English-only docs (yet. Have any of you?).
    Thanks in advance,
    - Alexander

  • How to search for words in a string?

    I have a list of strings that I need to search for instances
    of a certain word (or part of that word) is there a way of doing
    this in flash please?

    Quickest and easiest way to do it is to search through an
    array of manually entered words.

  • I have ca. 30 pdf documents I need to search for keywords; how can I do on my MAC?

    I have ca. 30 pdf documents I need to search for keywords; when I open these documents in Adobe Reader on my MAC, it shows a Search tool; however, when I search for keywords I know are in the document, none are found.  How can I do a keyword search?

    Do you know if the text has been OCR recognised? Are the original documents "scans"?
    An easy way to find out, if you can select an individual word or letter? If you are selecting a whole block of text then the document will need to be put through Optical Character Recognition (OCR) software first to enable you to keyword search.

  • PDF Search: Escape chars / search for words containing dots

    Hello,
    i'm trying to do a search for ip adresses in a pdf document - eg for "10.100.0.1" - but it seems that adobe reader doesnt cope with the included dots.
    Is there a way to search for words containing dots? Maybe some way of escaping the dot?
    Thanks,
    Moritz

    Reader can find dots just fine. There's probably something going on with your file, like font issues or spaces between the text, or something like that.

  • Searching for pictures with 2 keywords

    Hi guys, I was just wondering if there is way to search for files with two specific keywords.
    Lets say that I want to find picture that contains both Nicol and Brandy keywords. Not just one or the other. Is there any way to that in Bridge CS5?
       Thanks for your help.  Charles

    Yes, yes there is.  You need to use the Find function (Ctrl F in Windows).
    With the Find window you will see a + at the right edge of Criteria line.  Click that and it will add lines.
    Select the Match for "All criteria met".

  • TS1702 I purchased word-o-meter for words with friends. It now tells me i'm out of uses after 5 days? Isn't this a permanent purchase?

    I purchased word-o-meter for words with friends. It now tells me I'm out of uses. After 5 days? Wasn't this a permanent purchase?

    No, it's not a permanent purchase. Word-O-Meter takes tokens and once you run out you need to buy more. See:
    http://wordgamestrategies.com/index.php/words-with-friends-cheat/words-with-frie nds-word-o-meter-review/
    Regards.

Maybe you are looking for

  • Error help- "the operation could not be performed ...file... doesn't exist"?

    Hi, I am experiencing some probmels with ICE and can't find a reason for why.  I was able to edit the pages on the site through ICE about a month ago, but the client just let me know they can't do anything for any page.  I also can't do anything for

  • Sys password issue

    We have oracle 10.2.0.1 running on Unix WE didnt set the password of SYS user in oracle but now we would like to set I use the command alter user sys identified by password i got message user altered Now i tried connection to sys/password@abc as sysd

  • Photoshop layers palette greyed out

    I just upgraded from MacOSX 10.5.8 to 10.6 and using Photoshop CS4. Not sure if this is related to what happened today, but... "About Photoshop" is greyed out. Can't tell what version I have. I need to duplicate a layer in a high res RGB image. The L

  • Hierarchy Query - Removing Child Nodes

    Hopefully an easy one for someone practiced with hierarchy queries. If I have a hierarchy: A   B     CThe where clause restricts the result so that B is removed, I now have: A     CI would like to make it so that if you cut off a node, the entire bra

  • Adobe Indesign CS6 Pricing - Multiple Users

    Hi all, I would like to know in detail about the price plans for Indesign version CS6 with multiple user license (maximum 4). Please note that, We dont need the creative suite or the CC. Reply will be highly appreciated.