Skip to content

Instantly share code, notes, and snippets.

@fuba
Created November 27, 2012 16:52
Show Gist options
  • Save fuba/4155437 to your computer and use it in GitHub Desktop.
Save fuba/4155437 to your computer and use it in GitHub Desktop.
perl -I../lib -MYAML::Syck -MEncode -MNLPDocument::Sentence -e 'for (<>) { s/^.+?前\s//;my $s=NLPDocument::Sentence->new({str=>decode_utf8 $_});my %ff;map {$ff{$_->surface}++} $s->nouns;map {$f{$_}++} keys %ff}warn Dump [map {{$_ => $f{$_}}} (sort {$f{$b} <=> $f{$a}} grep {$f{$_} > 1} keys %f)]' /data/nicovideo.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment