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.
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...
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:(
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"...
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...
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...
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(...
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...
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...
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 (<>) {...
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...
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...
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(...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.