- 论坛徽章:
- 7
|
biru:- #!perl6
- my ( $da, @ta ) = $=finish.lines;
- my ( @this, %ha, %sh );
- for @ta {
- my ( $, $sp, $lit ) = .words;
- %ha{$lit}{$sp}++;
- %sh{$sp} ||= 1;
- }
- say join "\t", $da.words[*-1], @this = %sh.keys.sort;
- for %ha.sort: +*.key {
- say join "\t", $^p.key, @this.map: { $p.value{$_} || 0 };
- }
- =finish
- paper author cited
- name1 author1 2
- name2 author2 1
- name3 author1 3
- name4 author4 4
- name5 author1 2
- name6 author3 7
- name7 author4 5
- name8 author1 1
- name9 author4 2
- name10 author3 5
- name11 author3 11
复制代码 |
|