Hou can I count the words on a text

I am using Iterator which I think it only counts unique word so who can I count the all the words on the text

See i have Thispublic int getCount(String word) {
          // returns count for word
          Iterator<StringCounter> iter = ourWords.iterator();
          StringCounter sc;
          int count=0;
          while (iter.hasNext()) {
               sc = iter.next();
               if (sc.getString().equals(word)) {
                    sc.increment();
               count++;
          return count;
     }this only gets the words that are unique

Similar Messages

  • Can you change the wording of a text that someone sent you ?

    my sister sent someone a text , they in turn showed me on their phone with her name/number at the top of the feed  to prove she said something to this person about this certain subject . She is denying everything in this text and said he altered it to show me what he wanted me to see . Can you change the wording on a text sent from someone in their feed with their name/number at the top of the feed? Does this make sense ? What I do know is , you can copy and paste and change the wording when sending that text to someone else , but he showed me his own phone with these incriminating texts.

    No you can't

  • How can i count the word in a cell.

    Dear Experts,
    i want to count the word in cell how can i do this ?
    Isthere any function ?
    plz give logic or command.

    You can ty :
    SQL> var text varchar2(50)
    SQL> exec :text := 'How do I count the number of words in my cell?'
    PL/SQL procedure successfully completed.
    SQL> select text,
      2         sum(case when substr(text,rownum,1)=' '
      3                       and substr(text,rownum-1,1)!=' '
      4                  then 1
      5                  else 0 end) nb_word
      6  from (select rownum,:text||' ' text,length(:text) ln from dual)
      7  connect by level <= ln+1
      8  group by text
      9  /
    TEXT
       NB_WORD
    How do I count the number of words in my cell?
            11
    SQL>  exec :text := 'How     do I count the number of words in my   cell?    '
    BEGIN :text := 'How     do I count the number of words in my   cell?    '; END;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 1
    SQL> var text varchar2(1000)
    SQL> exec :text := 'How     do I count the number of words in my   cell?    '
    PL/SQL procedure successfully completed.
    SQL> select text,
      2         sum(case when substr(text,rownum,1)=' '
      3                       and substr(text,rownum-1,1)!=' '
      4                  then 1
      5                  else 0 end) nb_word
      6  from (select rownum,:text||' ' text,length(:text) ln from dual)
      7  connect by level <= ln+1
      8  group by text
      9  /
    TEXT
       NB_WORD
    How     do I count the number of words in my   cell?
            11
    SQL> select * from v$version where rownum=1;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    SQL> Nicolas.
    Well, we can discuss about what limit a word : here space, but there is point, double-point, and so on... And about what is a word : do the punctuation is a word ?
    For example :
    "It's a word !"=>how many words are in this sentence ?
    http://en.wikipedia.org/wiki/Word
    Message was edited by:
    N. Gasparotto

  • I just updated pages, I can't count the amount of words with space anymore. Can anybody help me?

    I just updated pages, I can't count the amount of words with space anymore. Can anybody help me?

    Yes me too, tried re setting and enabling changes but no agree button anywhere?

  • How can I use word count without it counting the words in the end notes by default?

    How can I use word count without it counting the words in the end?
    Now I have to highlight the text to get a count.

    I don't think that is possible, it does what it does.
    Peter

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • I have converted a pdf to word. How can I access the Word file from my online account?

    I have converted a pdf to word. How can I access the Word file from my online account? When it says 'download the converted file' I choose a location on my PC and click, but nothing happens. It seems that it can only save the converted file to my online account. I went to my online account but I see no way to look for the file

    Hey Fabrizio,
    You might need to sign up at "https://cloud.acrobat.com/exportpdf" using your Adobe ID credentials to convert your PDF file to Word.
    Do you get the 'download' prompt?
    Also, you can find the converted files by clicking at the 'Files' tab. 
    Please try the same using a different browser and check.
    Hope to hear from you.
    Regards,
    Anubha

  • How can I sort the words in a document into an alphabetical list?

    How can I sort the words in a document into an alphabetical list? Thanks!

    writer888 wrote:
    How can I sort the words in a document into an alphabetical list? Thanks!
    Copy the words to the Mac's clipboard (Edit menu> Copy)
    Paste into TextEdit 
    Next open the Edit > Find > Find window in Text Edit.
    Highlight a space between two words and Edit menu > copy, paste into the Find field
    Next create a return in the middle of your text and copy that and paste into the Replace field
    Click Replace All.
    Now Edit > Select All and Edit > Copy
    Open a Spreadsheet program with Sort ability and paste into the second column cell from the top
    place a "a" into the top column cell, select the entire colum
    Sort desending order
    Now if you need it out of spreadsheet format, then your going to need to copy just the data cells (not the entire column to avoid problems) and Paste "Special" as unformatted text into a word processing program
    If you need to get rid of the Returns, do the opposite you did in Text Edit, replace the Returns with Spaces
    A chore, but it's rare one needs to sort words into alaphabetical order.
    FYI, I used TextEdit and the free LibreOffice (Spreadsheet and Word Processing) for the above effects.

  • All of a sudden my 3 year old macbook pro screen is blurred - I can hardly read the words - any ideas?

    All of a sudden the screen on my 3+ year old macbook pro has blurred badly - I can hardly read the words - any ideas?

    You likely didn't erase the ENTIRE drive of the later OS X operating system before installing Snow Leopard. You just targeted the Macintosh HD partition.
    Try again, this time make sure to select the name and size of your boot drive at the top to catch the hidden EFI partition that's responsible for the splash screen at boot time (no screen = white)
    It will take two reboots to reset the EFI again, so once Snow is installed and reboots, reboot again.
    How to erase and install Snow Leopard 10.6
    How to revert your Mac to Snow Leopard
    Restoring firmware on Intel Mac's

  • Can't hear the words

    I just got my nano, subscribed to itunes, and I connected the two and the songs were uploaded to my nano, I can hear the music but not the words, what am I doing wrong?

    I just got my own, and as you I can only hear the words in the background.
    Have you figured out why or how to fix it?

  • 2.1: Can't type the word "MacBU"

    Since upgrading to 2.1, I can't type the word "MacBU" without deleting at least one letter. Every time I try, in any keyboard context, it ends up as "MacBI". No, I'm not just a poor touch-typist (pun not intended): even by sliding my finger from one of the surrounding letters, it skips over the U (and O for that matter, but I can still type "MacBO").
    Other words I can't type: MazBU, MaxBU, MavBU, MamB, but MabBU, ManBU, and Ma?BU work fine where ? is any letter not mentioned above.
    Anyone know what's up with this? Is it some sort of dig at Microsoft? Not funny if so.

    The general issue has come up before. There are certain letter combinations which seem to be a problem. A bug, I guess.
    With this one I found that I could type macBU fine in the To field of an email but I had precisely the issue reported by the OP when I tried to type it in the body of the email. The U comes out as an I and has to be corrected.

  • Can i remove the words "created in  trial version" from a file now i have purchased full version?

    Can I remove the wording " created in trial version" from a video now i have purchased the full version?

    Presumably a Premiere Elements question. For future reference note that Premiere Elements has its own forum and you should post further PRE questions there. But the answer to your question is in the PRE FAQ entry - http://forums.adobe.com/thread/433730?tstart=30.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • I converted a pdf to a word docx document - said saved online - I can not locate the word document?

    I converted a .pdf file to a word docx document - it indicated that the conversion was sucessful and "saved online" -
    I can't locate the word docx document - where does it save to?

    Hi sdammer.
    You can visit www.Adobe.com/exportpdf  login with your Adobe Id and password.
    Then go to file tab at the top left corner and you should be able to see your documents.
    Regards,
    Ajlan Huda

  • Since I am writing the book in Italian,how can I replace the word CHAPTER with CAPITOLO ?

    Since I am writing the book in Italian, how can I replace the word CHAPTER with CAPITOLO ?

    I think you need to run iBA in Italian so the templates are in that language.  You can do that by switching your OS X to Italian and then reopening iBA or perhaps by using this app to just change the iBA language:
    http://www.tj-hd.co.uk/en-gb/languageswitcher/
    see also
    https://discussions.apple.com/message/20745332#20745332

  • Need help to add the words in a text file to an arraylist

    I am new to java and I really need some help for my project.I want to add the words of a text file to an arraylist. The text file consist of words and the following set of punctuation marks {, . ; : } and spaces.
    thanks in advance :-)

    I/O: [http://java.sun.com/docs/books/tutorial/essential/io/index.html]
    lists and other collections: [http://java.sun.com/docs/books/tutorial/collections/index.html]

Maybe you are looking for

  • GL account and CO object

    Hi friends, What is the tcode to see list of GL accounts(plantwise) with their corresponding CO object assignments? Thanks and regards.

  • The recent section in the aperture library isn't working

    The recent section in the Aperture library is supposed to contain the last few months, the last import, the photo stream, etc. My recent section has started to have a mind of its own. The first item is a project from several months ago. I can't delet

  • Sending From Mail Alias

    Hi, Is there a way to allow a user to send using a different From address than his primary? I've followed various examples for Exchange 2003 and haven't been able to do it. We are planning to migrate to 2010 later this year and I'm wondering if anyon

  • The problem of the error in the writer Emile Aaclaud

    Emile mis first may.gulf @ gmail.con I hope the new may.gulf @ gmail.com The difference in the com and con

  • Livecycle on Windows 7

    Sorry for the non-techie question on a techie bulletin board... I've been doing a lot of development using Livecycle Designer ES 8.   Works great (okay, some crashes - but we understand each other by now...)   I don't need anything other than Designe