Get all occurrences of a Word.

Hello

Is it possible to find all occurrences of a word in a single document using Oracle text?

Or maybe a count of how many times a word appears in a document?

I had a glance at the documentation and the web and don't think it is, could anyone suggest a way to do this?

Thank you very much

Darren.

Hello

You can, as Roger said to use ctx_doc.tokens. This works if you already have a clue (text) on the document. You also have the option to use ctx_doc.policy_tokens. This does not have a clue, but needs a policy. The two proceedings are with examples in the Manual: [url http://download.oracle.com/docs/cd/E11882_01/text.112/e16593/cdocpkg.htm#CEGCIDAJ] package CTX_DOC.

Herald tiomela
http://htendam.WordPress.com

Tags: Database

Similar Questions

  • Find the first occurrence of a Word

    I have a script which detects and counts all occurrences of a Word.

    I need the script to find the FIRST occurrence of a Word only.

    Can any advise please how do I change the script to find the first occurrence of the word?

    Script as follows:

    {

    numWords = this.getPageNumWords var (0);

    for (var i = 0; i < numWords; i ++)

    {

    var ckWord = this.getPageNthWord(0,i);

    If (ckWord is 'MATERIAL')

    {

    / * Script going here based on the finds the first occurrence of the word 'MATTER ' * /.

    }

    }

    }

    I tried var CKWord = this.getPageNthWord (0,0); but reports from the rear console is UNDEFINED?

    numWords = this.getPageNumWords var (0);

    var number = 0;

    for (var i = 0; i)
    var ckWord = this.getPageNthWord(0,i);
    If (ckWord == "ISSUED") {}
    Count ++;
    If (count == 2) {}
    var = this.mouseX Coord.

    var annot = this.addAnnot({)
    page: 0.
    type: "Stamp."
    name: "AppStamp."
    Rect: [coord + 1000, 2300, 30, 2820]
    rotation: 90,.
    ({AP: '#C94cHAFFa42U1gTH5Tug5C'});
               
    break;
    / * this.flattenPages (); */
    }
    }
    }

  • Replacing the occurrences of a Word by links

    Hello

    I'm writing a Javascript script that should replace all occurrences of a word given in an Indesign CS3 document by a hyperlink pointing to a given URL.

    I am very new to Indesign scripting, and I don't know where to start. I tried searching this forum, but couldn't find the answer to my problem.

    If anyone can help...

    Thank you

    Bertrand

    You can use my findAndDo Script (the blog is in German): http://www.indesignblog.com/?p=7

    for a hyperlink, you need to change:

    app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.findWhat = "SEARCH";
    var erg = app.activeDocument.findGrep ();     
    
    for (var i = erg.length - 1; i >= 0; i--) {
        var _hlinkSource = app.activeDocument.hyperlinkTextSources.add(erg[i]);
        var _destination = app.activeDocument.hyperlinkURLDestinations.add("http://www.google.de");
        app.activeDocument.hyperlinks.add(_hlinkSource, _destination);
    }
    
  • Find all occurrences of a term, through multiple Word documents and examine each instance in its local context (i.e. extracted)

    Hi all

    I'm looking for an easy way to find all occurrences of a term, through multiple Word documents and review of each instance of the word in its local context (i.e. extracted) without having to open each document.

    For example, if I want to search the term "religious atmosphere", the search results would be something like:

    Paper 22: '.. '. but the religious atmosphere had not evolved to the point where... »

    Paper 22: "...". not that the religious atmosphere was still too controversial for a settlement... »

    Document 35: "...". If anything, the religious atmosphere was still little developed for a city... »

    Document 35: "...". it in no way improve the religious atmosphere until the decision was... »

    Paper 42: '.. '. up to - what point, the religious atmosphere was very collegial with all the elements of... »

    Any Microsoft or utility 3 rd-party which can put each instance-by-side and in a context extract would be a real, real help!

    Any ideas?

    Thank you

    Jay

    Ken is perhaps more familiar with the Agent Ransack, I am, but a quick check she finds every instance of a string of text and shows the term in the context of a single line subject to the following:

    • At the end of the search, a list of the files found is accompanied by some statistics.
    • If you select one of the files found, each 'hit' for this file is displayed in the context of a single line.  In other words, you get a list of hits in context as in your original question.  Instead, you get a list of, say, 42 documents and then if you have selected the Document 22, you will see:
      • «.. but the religious atmosphere had not evolved to the point where... »
      • «.. . not that the religious atmosphere was still too controversial for a settlement... »
    • The display of content seems to work with OK * .doc, *.docx and files *.pdf; not so many other types of files - even if it looks for text in all kinds of other files.

    Agent Ransack is free.  Download and try it.  If you don't like, just uninstall.

  • Why my dads account Windows Live Mail have much more FONTS, (including the one I have want - old English) than mine? And how can I get all the other FONTS? Thank you.

    My father and I have a very similar computer (his has a little more memory, until I bought a thing of 1000 mb storage) we have almost the same e-mail program, but it flows from Telus, I run Hotmail. There are many more fonts included in its ability to e-mail. How can I get all those other fonts, I change the fonts almost all the letters that I write. Thank you for your help, and I hope that I have explained myself enough.

    A computer has a folder of fonts.  Some fonts come with the computer, some are added by installed programs, and some can be added by the user.

    When you do anything on the computer, in the folder fonts fonts are used.

    When you create an html e-mail, or the word document, the font is a part of the information stored by email or document.

    Fonts do not attach to e-mail or in this document.

    When another computer displays the e-mail or document, the police does not exist on this computer.  Another font will be used.

    The only way to have your email look exactly as you created it is to send a photo of the enamel.

  • Find and replace all occurrences of a string within the current paragraph.

    I did so much work, and it's my last method to implement.

    I want to get the current active doc the current paragraph and replace all occurrences of a string inside this paragraph with another string.

    For example, say I have the following paragraph in a document:

    «This is a sentence that.» This is another sentence. It is also another sentence. The sentence ".

    If the user opens the document containing the paragraph and goes to this paragraph by clicking in any place in there, I want to replace e.g.g "another punishment" with "phrase.

    But only in the current active paragraph in the active document.

    I found a code with F_ApiFind and F_ApiGetTextRange to get the current text selection, but I can't think of a way to do it.

    Post edited by: Efstathios Chatzikyriakidis

    Problem solved people. Thank you.

  • Add the signature field to the second occurrence of two words (nieme Word) on the page


    I have a script that searches for two words ("APP ENG") on a page and adds a digital signature field.

    The trick is that there are two occurrences of these words and place the script in the field of digital signature on the first ocurrance of the two words.


    I need the digital signature script to add to the second occurrence of these two words.

    There was a counter added the script, but this place then the field on the word ("ENG"), it might have to do with the meter to count one word instead of two.


    If someone can help me to modify the script to count the words and the occurrences of two words instead of one word it would be most appreciated.

    Script as follows:


    var ckWords; pair of words to test

    var number = 0;

    numWords = this.getPageNumWords (0); number of words on the page

    loop through the words on the page

    for (var j = 0; j < numWords-1; j ++) {}

    get the pair of words to test

    ckWords = this.getPageNthWord (0, j) + ' ' + this.getPageNthWord (0, j + 1); test words

    If (ckWords == "ENG APP") {}

    Count += 1;

    If (count == 2) {}

    var q = this.getPageNthWordQuads (0, j);

    convert quads in the rotation by default user space

    Userspace used by links

    m = (new Matrix2D).fromRotated(this,0);

    mInv = m.invert)

    r = mInv.transform (q)

    r = r.ToString)

    r = r.split(",");

    var m = this.addField ("EngSignature", "signature", 0,

    ([r [0], [1] r, r [2], r [5]]) ;

    }

    }

    }

    Thank you.

    You must use the left coordinates of the first table and the right of the second table.

  • If I get the basic pdf to Word and Excel conversion Services, it also converts graphics into Word documents?

    If I get the basic pdf to Word and Excel conversion Services, it also converts graphics into Word documents?

    Thanks Dan

    Hi Dan,.

    You can subscribe for services to export it in PDF ( https://cloud.acrobat.com/exportpdf ) to help you can convert all formats of files mentioned in this document KB file formats supported. ExportPDF, Adobe PDF Pack.

    Let me know in case if you have any additional questions.

    Kind regards
    Nicos

  • Is Acrobat Pro just for us. We have an employee handbook that needs editing. A part is current pdf, some of an earlier version. You want to get all in a manual, the table of contents automatically adjust and links to specific pages of the table of content

    Is Acrobat Pro just for us. We have an employee handbook that needs editing. A part is current pdf, some of an earlier version. You want to get all in a manual, the table of contents automatically adjust and links to specific pages of the table of contents.

    Acrobat Pro is certainly not the right tool for editing. You want to change the manual using the source - MS Word files for example. Once you have the full changes including OCD work as you want, Acrobat Pro is the tool to convert the source document to PDF format, and ensure the accessibility requirements of 508 - and preferably ISO 14289 (PDF/UA) - are met.

  • How can I add a style "BOLD" grep on the first occurrence of a Word?

    Hi all

    I need help on adding a style "BOLD" grep on the first occurrence of a Word.

    I can add the "BOLD" to the word, but it adds to all occurrences, see below:

    GREP style (Incorrect)

    Apply Style: "BOLD"

    Text: \ < Lorem Ipsum\ >

    Nam Lorem Ipsum semper pellentesque tincidunt. UT nisi sit amet arcu nulla tristique dictum. SED commodo total non mauris cursus pretium. Lorem Ipsum Aliquam erat volutpat. Morbi id pretium justo. Nam lorem quis facilisis molestie risus fermentum. Vestibule ut sem elit. Nunc eget neque Sed elementum augue EU outbound.

    I need only the "BOLD" to add to the first occurrence of the word, as below:

    Nam Lorem Ipsum semper pellentesque tincidunt. UT nisi sit amet arcu nulla tristique dictum. SED commodo total non mauris cursus pretium. Lorem Ipsum Aliquam erat volutpat. Morbi id pretium justo. Nam lorem quis facilisis molestie risus fermentum. Vestibule ut sem elit. Nunc eget neque Sed elementum augue EU outbound.


    Thanks in advance for the help!

    This should do it for you

    Apply style

    "BOLD"

    text (? i) ^(.+?) Lorem Ipsum

    apply the stye

    Book

    text: ^. * ? (? = Lorem Ipsum)

    The first expression search all the text from the beginning of the parapgrah through the Lorem Ipsum

    The other defines the rest of the text before the Lorem Ipsum to the base style (book, novel, or whatever your basic style)

  • Get all the tables on a page

    I need to get all of the tables on a particular page. The document consists of a bunch of unrelated text blocks. I use this to retrieve the tables:

    var doc = app.activeDocument;
    page var doc.pages = [54];

    var tables = page.textFrames.everyItem ().tables.everyItem () .getElements ();
    Alert (tables. Length);

    This page (page 55) has 3 tables on it, but my code returns only 2 tables. A table can be placed directly on a page and not be in a block of text? If Yes, what is the best way to get all the tables in a page? Thank you very much.

    Rick Quatro

    Ah, I don't know who. "Tables" is a collection, not a simple table and a reckless experimentation of shows that you can't simply use .concat glue them together.

    I'm sure I've seen a couple of workarounds for a situation like this. Maybe it's time to read "[CS3] [JS] everyItem() and getElements()"-i.e. of Marc Autret posts on this subject, at the end of this thread.

    In other words, if you stick to use everyItem()! It is perhaps easier to build a table "the old-fashioned way". Copy the following code is based on my earlier assumption you officials texts bound in management of related texts, but you can rewrite it to accommodate groups, thus:

    t = app.layoutWindows[0].activePage.textFrames.everyItem().tables;
    tableList = [];
    for (i=0; i		   
  • Regex to replace all occurrences of an empty string, except the last

    Hello, everyone!

    I need get to a regular expression to replace all occurrences of an empty string except the last. Right now I'm doing this with this code:
    public static void main(String[] args)
    {
        String str = "abc";
        String regex = "";
        System.out.println(str.replaceAll(regex, "-").replaceFirst("-$", "")); // -a-b-c
    }
    As you can see, to do this, I have to make two calls: one for replaceAll and another for replaceFirst to get rid of the last character. So I would like to get rid of the call to replaceFirst and have the variable of regex as being a regular expression that would be to insert the character along the chain of all but the last. I'm really not very good with regexs, so I ask your help here. The thing I work, but I think it would be more elegant with just a regex to do.

    Thank you in advance.

    Marcos

    Try this:

    String data = "abc";
    System.out.println(data.replaceAll(".", "-$0"));
    
  • Count occurrences of matched words

    All,
    Does anyone know the syntax or the algorithm to count the occurrences of matched words that separate compared cases of two tables or columns? Here is a simple example of the type of comparison, I would like to perform. I found the regexp_count function, but it only works in 11g. Unfortunately, I have Oracle 10 g. Any help would be greatly appreciated. Thank you

    i.e.

    drop table compare_matched_words;

    create table compare_matched_words)
    number of query_id,
    query_string1 varchar2 (80).
    query_string2 varchar2 (80)
    );

    insert into compare_matched_words values (1, 'oracle' 255', oracle1 255');
    insert into compare_matched_words values (2, ' larry ellison or ','larry or ');
    insert into compare_matched_words values (3, 'oracle and text', 'and');
    insert into compare_matched_words values (4, ' groups1 market share ","market share");
    insert into compare_matched_words values (5, ' larry or "," larry ellison ");
    insert into compare_matched_words values (6, 'oracle1' 255', oracle 255');

    Is not in 11g. Before that you can solve the task, you need to split QUERY_STRING1 and QUERY_STRING2 in words and then compare the words for QUERY_ID even. To split the string into words use something like:

    select  query_id,
            regexp_substr(query_string1,'\w+',1,column_value) query_string1_word
      from  compare_matched_words t,
            table(
                  cast(
                       multiset(
                                select  level
                                  from  dual
                                  connect by level <= length(regexp_replace(regexp_replace(QUERY_STRING1,'\w+','A'),'[^A]'))
                               ) as sys.OdciNumberList
                      )
                 )
    /
    SQL> /
    
               QUERY_ID QUERY_STRING1_WORD
    ------------------- -------------------
                      1 oracle
                      1 255
                      2 larry
                      2 or
                      2 ellison
                      3 oracle
                      3 and
                      3 text
                      4 market1
                      4 share
                      5 larry
    
               QUERY_ID QUERY_STRING1_WORD
    ------------------- -------------------
                      5 or
                      6 oracle1
                      6 255
    
    14 rows selected.
    
    SQL> 
    

    Now:

    select  t1.query_id,
            t1.query_string1,
            t2.query_string2,
            count(*) matchin_word_count
      from  (
             select  query_id,
                     query_string1,
                     regexp_substr(query_string1,'\w+',1,column_value) query_string1_word
               from  compare_matched_words t,
                     table(
                           cast(
                                multiset(
                                         select  level
                                            from  dual
                                           connect by level <= length(regexp_replace(regexp_replace(query_string1,'\w+','A'),'[^A]'))
                                        ) as sys.OdciNumberList
                               )
                          )
            ) t1,
            (
             select  query_id,
                     query_string2,
                     regexp_substr(query_string2,'\w+',1,column_value) query_string2_word
               from  compare_matched_words t,
                     table(
                           cast(
                                multiset(
                                         select  level
                                            from  dual
                                           connect by level <= length(regexp_replace(regexp_replace(query_string2,'\w+','A'),'[^A]'))
                                        ) as sys.OdciNumberList
                               )
                          )
            ) t2
      where t2.query_id = t1.query_id
        and t2.query_string2_word = t1.query_string1_word
      group by t1.query_id,
               t1.query_string1,
               t2.query_string2
      order by t1.query_id
    /
    
               QUERY_ID QUERY_STRING1                  QUERY_STRING2                   MATCHIN_WORD_COUNT
    ------------------- ------------------------------ ------------------------------ -------------------
                      1 oracle 255                     oracle1 255                                      1
                      2 larry or ellison               larry or                                         2
                      3 oracle and text                and                                              1
                      4 market1 share                  market share                                     1
                      5 larry or                        larry or ellison                                2
                      6 oracle1 255                    oracle 255                                       1
    
    6 rows selected.
    
    SQL> 
    

    SY.

  • Me and my dad is from the same Apple ID and I want to set up his own, but how it will get all his contacts, photos etc from my Apple ID? Or he will lose all? or I could keep them saved for him and send more via an application any?

    Me and my dad is from the same Apple ID and I want to set up his own, but how it will get all his contacts, photos etc from my Apple ID? Or he will lose all? or I could keep them saved for him and send more via an application any? I don't know how to resolve this issue, if someone could point me in the right direction.

    Have him create a id Apple here- create and start using a Apple - Apple Support ID, and then both you can create an album-photo sharing Photo Sharing - Apple Support iCloud

  • How can I get all internet radio to work again in iTunes?

    I am running iTunes version in Mac OS X version 10.11.6 12.4.2.4 (El Capitan) on a MacBook Pro. When I go into iTunes and not select the option of internet radio stations under news / talk of work. For example, WMAL does not, and yet I can get the live stream of Safari or FIrefox. How can he get all the internet radio stations under Radio Internet option at work?

    Please notify.

    I still use iTunes 7.5, so I can't verify or deny these workstations.  I don't think that there is nothing that you can do to change their mode of operation in iTunes.  If you can get the URL of the actual flow of the web site of the station you can open it with iTunes and it will be added as a regular track that you can then put in a playlist you do for these stations.

    Edit: I just couldn't WMAL to play when I tried to play on their web site. Maybe its watercourse is down?

Maybe you are looking for

  • Dock VB043AA (compatible with Elitebook 8470p) - including the power?

    Hello There are 2 docks compatible with the p 8470 90 w (VB041AA) dockside a dock of 230w (VB043AA) I do not see the real differences when checking the plug: http://portal.tugraz.at/portal/page/portal/files/Zid/files/Datenblatt/computing/HP-docking.P

  • You are looking for the block CD build based on the time for MPC simulation.vi

    Hello everyone! I'm trying to implement MPC in LabVIEW. I downloaded some code that shows the implementation. My question is in these codes that I see a named block as CD build based on the time for MPC simulation.vi. I tried to find a lot of this bl

  • Unable to activate Windows after replacing the hard drive.

    Original title: Activation. I got a laptop with Windows vista installed oem ADVENT but the motherboard has developed a fault that cannot be repaired or replaced because of the age of the laptop since I mount the hard drive in a computer laptop fujits

  • Pushing a screens poping

    OK, I have an app that launches a wallpaper with several buttons, when a button is clicked, I need to push the new screen. But my screen stretches the screen and you can only push and pop with UiApplication. So, how is? Ty for your time...

  • Password blackBerry Smartphones

    Downloaded desktop software for PC and it asks password. It is not to recognize the combined password which is what the man in the shop of vaodaphone told me to use. Should what password I use a quick response would be much appreciated as I have to u