Search:

Type: Posts; User: Dinesh Raja

Page 1 of 2 1 2

Search: Search took 0.38 seconds.

  1. Re: Program to find the number of occurrences of words in the text file

    Yes you are right you have understood my need correctly here is my updated code still i am confused about using Regular Expression.


    import java.io.*;
    import java.util.*;

    class...
  2. Re: Program to find the number of occurrences of words in the text file

    The variable "n" has been replaced by "k".
    k is used for storing an number which says the top occurring words i mean if hello:4,hi:3,norm:1 and the user enters 2 for "k" then hello:4,hi:3 is only...
  3. Re: Program to find the number of occurrences of words in the text file

    Yes it must read ALL THE WORDS from ALL the files present in the path and add them all to the ArrayList BEFORE sorting.



    I am sorry forgot to press "Shift" while typing "C" yes its built-in...
  4. Re: Program to find the number of occurrences of words in the text file

    Here is the design
    1)The application must prompt the user to enter the number "n" which is the top frequent words if n=2 the code must show the top two words with largest count as a result.

    2)The...
  5. Re: Program to find the number of occurrences of words in the text file

    now i have replaced j+1 with j now no exception is thrown.
    Kindly check my previous post i have modified the logic now using ArrayList and Collections.frequency function to count the frequency of...
  6. Re: Program to find the number of occurrences of words in the text file

    Norm,here i have modified the code now i have decided to read the file contents and add it to an List(ArrayList) by splitting the contents by space and i am using the inbuilt function of collection...
  7. Re: Program to find the number of occurrences of words in the text file

    After adding the printing statement to print the line variable contents my output is as follows:

    Enter the number of words to find its frequency:
    3
    Enter the file path to analyse the words:...
  8. Re: Program to find the number of occurrences of words in the text file

    i have made the code to store the contents of line variable as an string array (words) by using space as delimiter and i am printing the contents of that words array,I have not made the code as to...
  9. Re: Program to find the number of occurrences of words in the text file

    sorry i will follow this method of posting right from now thanks for being patient with my mistakes and here is the code which i am having now


    import java.io.*;
    import java.util.*;

    class...
  10. Re: Program to find the number of occurrences of words in the text file

    Okay i have revoked the change in scanner object and i have added the println statement after splitting the contents by space (Line number:33)Norm
  11. Re: Program to find the number of occurrences of words in the text file

    import java.io.*;
    import java.util.*;

    class Counter {

    public static void main(String[] args) throws NullPointerException {
    System.out.println("Enter the number of words to find...
  12. Re: Program to find the number of occurrences of words in the text file

    I commented out the second scanner object "scan 1" now its not allowing me to enter an text its not listening here is the output

    Enter the number of words to find its frequency:
    3
    Enter the file...
  13. Re: Program to find the number of occurrences of words in the text file

    here is the output after adding "System.out.println("1"+ java.util.Arrays.toString(words));"

    Enter the number of words to find its frequency:
    3
    Enter the file path to analyse the words:...
  14. Re: Program to find the number of occurrences of words in the text file

    import java.io.*;
    import java.util.*;

    class Counter {

    public static void main(String[] args) throws NullPointerException {
    System.out.println("Enter the number of words to find...
  15. Re: Word frequency counter

    yes i am sorry i have forgot about that post :( i will continue from there
  16. Re: Program to find the number of occurrences of words in the text file

    Yes Norm but i have forgot about this post i am sorry for posting the same problem again but i have updated the code now i will remove my new post and continue it here :)

    --- Update ---

    I have...
  17. Word frequency counter

    Hi,I am working on an small assignment to read the text file(s) and count the frequency of words occurring in those files and print the top n words (which user will specify) and print the word and...
  18. Re: Program to find the number of occurrences of words in the text file

    Actually i have not coded it i am asking how can i do that and the root word can be in any part of the text like it can start with or endwith or it may contain it.
  19. Re: Program to find the number of occurrences of words in the text file

    I am defining based on my code requirements if my code reads an text file a.txt it contains 6 words say big,bigger,biggest and long,longest then the root words are big and long so my code needs to...
  20. Re: Program to find the number of occurrences of words in the text file

    Can i use substring formation?or is there any other good way for it
  21. Re: Program to find the number of occurrences of words in the text file

    But my code is going to find the frequency of words for an random file which the user selects so its not possible to predetermine the root words list and use it for reference :-(
  22. Re: Program to find the number of occurrences of words in the text file

    Thats why i am confused how can i achieve it i couldnt find any logic for this but i need to do that in my code :(
  23. Re: Program to find the number of occurrences of words in the text file

    I meant to say that for example tallest and taller are derived or enhanced from the word "tall" so now the frequency of tall must be 3

    I am sorry in a hurry i made the post like that now i have...
  24. Program to find the number of occurrences of words in the text file

    Hello i am doing an small project to find the top "n" words of an text file based on their frequency of occurrence but i am having few problems in my code now its printing the number of occurrences...
  25. Re: Algorithm for building an dynamic dictionary and auto spell corrector?

    i have found that using BK-tree algorithm will be efficient way i am going through it :)
Results 1 to 25 of 33
Page 1 of 2 1 2