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 strongm 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: *

  • Users: diera
  • Order by date
  1. diera

    perl: remove non-english sentence

    Hi, thank you Duncan. As feherke's question, can you specify the package? i have run the code, it seem the file not exist. 'Can't open dictionary: No such file or directory at C:....' thank you very much.
  2. diera

    perl: remove non-english sentence

    Hi, I would like to filter all the sentence in my dataset which is not in English language. I already take a look to remove for non-ASCII character but sometime the character for some language are the same with English. Do you know any Perl library or dictionary to filter non-english word. any...
  3. diera

    Perl: string comparison

    hi feherke, For numbering in the dataset, i just put in here to differentiate between the data. In real dataset its only have userid date time tweet #delimited by tab but somehow, i just realize that some line only contain tweet:(
  4. diera

    Perl: string comparison

    hi, My intention is to extract all the questions tweet. Actually there is also a tweet that did not contain '?' but its actually a question. use strict; #use warnings; use diagnostics; open( INFILE, "tweets.data" ) or die("Can not open input file: $!"); open MYFILE, ">qtweet.txt"...
  5. diera

    Perl: string comparison

    Hi all, I would like to extract the message that contain questions indicators like question mark and string 'what, where, who, how' at the beginning of the sentence. herewith my code use strict; #use warnings; use diagnostics; open( INFILE, "tweets.data" ) or die("Can not open input...
  6. diera

    Perl: download tweet using Twitter API

    Hi all, i was wondering if anyone has any experience using Twitter API? Do you have any idea how i can crawl the Twitter messages using Twitter API with perl? Actually i need to crawl the tweets and replies to the respective tweet(GET statuses/show/:id). This data i will use it to do some data...
  7. diera

    create matrix from csv data file

    Hi tonykent, i already got the right output. just edit a little bit. Thank you so much. best regards diera
  8. diera

    create matrix from csv data file

    Hi all, thanks for your suggestion. Actually i have make some code before but it seem i can't get the output as i need. my code so far #!/usr/bin/perl #use strict; #use warnings; use Text::CSV_XS; # Store our CSV file name my $file = 'apa2.csv'; open( CSV_XS, '<', $file ) or die(...
  9. diera

    create matrix from csv data file

    Hi, i have data as below: -DATA- tweetid, workerid 10115, user1 10115, user2 10190, user1 10190, user2 10193, user3 10320, user2 10320, user1 I have no idea, how i can write a code to transform this data to the 2D matrix. My desire output is: tweetid user1, user2, user3 10115 1...
  10. diera

    how to keep just none duplicate data

    Thanks all for your kindly help.
  11. diera

    how to keep just none duplicate data

    Hi all, i have tried using this code to just print out none duplicate data. #!/usr/bin/perl use strict; use warnings; my $file = '/perlscript/tweet/notbroadcast.txt'; open MYFILE, ">noneduplicate.txt"; select MYFILE; local @ARGV = ($file); my %lines; while (<>) { $lines{$_}++; } print...
  12. diera

    how to keep just none duplicate data

    Hi, i just found the solution. Herewith the code by tadmc which is i've make some minor modification. #!/usr/bin/perl use strict; use warnings; my $file = '/perlscript/tweet/notbroadcast.txt'; open MYFILE, ">noneduplicate.txt"; select MYFILE; local @ARGV = ($file); my %lines; while (<>) {...
  13. diera

    how to keep just none duplicate data

    Hi, i found a lot of code to remove duplicate data. in my case, i would like to print only none duplicate data. any suggestion how to do it? example data. aaaaaaaaaaa bbbbbbbbbbb bbbbbbbbbbb ccccccccccc ddddddddddd ddddddddddd the desire output: aaaaaaaaaaa ccccccccccc any help is much...
  14. diera

    Perl: split data by line and column in csv file

    Hi, when i run use small data, the result is correct. but the problem when i run 324 line of data, the ouput split only up to 368 line which is suppose to up to a few thousand line of output. please help me.... #!/usr/bin/perl use strict; use strict; use warnings; use Text::CSV_XS; # Store...
  15. diera

    Perl: split data by line and column in csv file

    YEs, its worked now. Thanks prex1. I'm totally new to perl. i learn it myself and started only a month ago. Thank you again for your kindly support.
  16. diera

    Perl: split data by line and column in csv file

    my apology for my mistake. i already change the structure of my program, but it seem have an error structure in the output. #!/usr/bin/perl use strict; use strict; use warnings; use Text::CSV_XS; # Store our CSV file name my $file = 'yuhuuuuu.csv'; open( CSV_XS, '<', $file ) or die(...
  17. diera

    Perl: split data by line and column in csv file

    Thanks prex. i have tried your code but this error occured: Use of uninitialized value $data[0] in hash element at C:\perlscript\tweet\split .pl line 19. Use of uninitialized value in index at C:\perlscript\tweet\split.pl line 24. #!/usr/bin/perl use strict; use strict; use warnings; use...
  18. diera

    Perl: split data by line and column in csv file

    Hi, i have data in csv file. i want to split it base on line and column. my code so far: #!/usr/bin/perl use strict; use strict; use warnings; use Text::CSV_XS; # Store our CSV file name my $file = 'input.csv'; open( CSV_XS, '<', $file ) or die( 'Unable to open csv file ', $file...
  19. diera

    Perl: split sentences into words

    Hi, how i want to remove the stopwords from the sentence. ____stopwords____ a about above according across actually adj after afterwards...
  20. diera

    Perl: split sentences into words

    Thanks Miller. Do you have any suggestion which PERL book is the best to refer as i am the beginner.

Part and Inventory Search

Back
Top