Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. lillyth

    read files form directory

    Sorry for the double posting... -lil
  2. lillyth

    read files form directory

    @rharsh: I take the pathname from my XP-window so there should be no typos... Using your code I get empty lines when I run the program, which means that the problems come in: [code] open IN, "< $file" or die "Cannot open $file for read\n$!"; [\code] when trying to open $file and the response...
  3. lillyth

    read files form directory

    @rharsh: I take the pathname from my XP-window so there should be no typos... Using your code I get empty lines when I run the program, which means that the problems come in: [code]open IN, "< $file" or die "Cannot open $file for read\n$!";[\code] when trying to open $file and the response is...
  4. lillyth

    read files form directory

    I cannot print out what is in @files because it is simply not reading the files... It claims it cannot open C:./Documents... And I have tried with " " instead of ' ' and with forward-slashes as well as backslashes and dubble-slashes in case it is interpreting what is inside the quotes. When I...
  5. lillyth

    read files form directory

    Hi again! Now I have pretty much tried every suggestion posted here. In the particular version shown below, I get the following error: Cannot open C:./Documents for read No such file or directory at ... line 12 Most versions seem to have the same problem, when I want to open the current...
  6. lillyth

    read files form directory

    The files are two text files with the following: computer science ( or computing science ) is the study and the science of the theoretical and: foundations of information . The resulting file should be: computer 1 science 1 information 1 people 1 Was this what you wanted to know? -lillyth
  7. lillyth

    read files form directory

    Hi again. Thanks! I changed to the proposed my @files = glob "C:/... ". Now it is complaining at the second while loop. I would like to do the following: for each file i for each row j in i do something. Am I calling the open file right in :while(<$_>)? Best, -nina.
  8. lillyth

    read files form directory

    Hi! I need to read text files from a directory and do some operations on all the files at once. This in order to get frequency counts for words over all files. Any guesses to why this code is not working? The error message is: "Cannot open 'C:\Doc...\*.txt' Invalid argument at line 12" While...
  9. lillyth

    creating co-occurrence matrix from raw text

    In that case, I claim the algorithm has O(N) as complexity.
  10. lillyth

    creating co-occurrence matrix from raw text

    @ishnid You are right, the second loop is not there, but I claim that the third loop, where you wrote ( do some operation ), will need t look-ups. That is, to check if a word j within w of the current position is a term, you need to scan through the terms and see if j is in this list. Here is...
  11. lillyth

    creating co-occurrence matrix from raw text

    @ishnid, No the number of words in the data file is larger than the number of terms. It is not that every word (except stop words) become terms. We are only interested in nouns and noun phrases and hence those are the only words in our terms list. The algorithm proposed is: for every word a...
  12. lillyth

    creating co-occurrence matrix from raw text

    Thank you both for your valuable insights. If I am not mistaken the algorithm proposed here will have a complexity of O(N*t*w) where N is the number of words in the datafile, t is the number of terms and w is the window size. The algorithm that I chose I believe only needs O(N*t) to run. Thank...
  13. lillyth

    creating co-occurrence matrix from raw text

    @ishnid It seems to me that you do not consider the distances between terms when you remove the rest and only leave the terms in the array. Then the w terms that occur after each other in the document co-occur, but they may not be within a distance of w from each other in the original text...
  14. lillyth

    creating co-occurrence matrix from raw text

    @steve We should increment both termA/termB as well as termB/termA. This because the matrix will later map to a graph where the edges have direction and we want both directions to be valid. If termA co-occurs with termB then it also holds the other way around.
  15. lillyth

    creating co-occurrence matrix from raw text

    I am looking for semantic meaning of words, so occurring in the same document is too wide. I need to say that two words co-occur if they appear within w words from each other and I want to be able to set w as a parameter.
  16. lillyth

    creating co-occurrence matrix from raw text

    Well, you are a bit right... It is phd-work. The actual aim is to extract semantic information from the graphs build by the co-occurrence matrix, using mathematics. So, because this is not what I specialize in I was hoping someone would help, even though it is not very far from school work.
  17. lillyth

    creating co-occurrence matrix from raw text

    Hi! I need to create a co-occurrence matrix from a text file. So far I have a term extractor that given the file ( data.txt ) returns a file with the relevant terms (term.txt). From these two I would now like to create a co-occurrence matrix using a window of size w. I am guessing that the...

Part and Inventory Search

Back
Top