20.07.2013 Views

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Stabler - Lx 185/209 2003<br />

jane austen<br />

austen chapter<br />

chapter sir<br />

sir walter<br />

walter elliot<br />

elliot <strong>of</strong><br />

<strong>of</strong> kellynch<br />

kellynch hall<br />

hall in<br />

in somersetshire<br />

somersetshire was<br />

was a<br />

a man<br />

man who<br />

who for<br />

for his<br />

his own<br />

own amusement<br />

amusement never<br />

never took<br />

(20) 38%sort -d bigrams > bigrams.srt<br />

39%more bigrams.srt<br />

a bad<br />

a bad<br />

a bad<br />

a bad<br />

a bad<br />

a ball<br />

a bar<strong>on</strong>et<br />

a bar<strong>on</strong>et<br />

a bar<strong>on</strong>et<br />

a bar<strong>on</strong>et<br />

a bar<strong>on</strong>et<br />

a bar<strong>on</strong>etcy<br />

a bar<strong>on</strong>etcy<br />

a bar<strong>on</strong>ight<br />

a barouche<br />

a beautiful<br />

a bed<br />

(21) 40%uniq -c bigrams.srt > bigrams.cnt<br />

41%more bigrams.cnt<br />

5 a bad<br />

1 a ball<br />

5 a bar<strong>on</strong>et<br />

2 a bar<strong>on</strong>etcy<br />

1 a bar<strong>on</strong>ight<br />

1 a barouche<br />

1 a beautiful<br />

1 a bed<br />

1 a beloved<br />

1 a bend<br />

Here, wc -l bigrams.cnt gives us 42,728 – the number <strong>of</strong> bigram types – sequences <strong>of</strong> two word<br />

types that occur in the text.<br />

Notice that 42,728 < 57422 =32,970,564, – the number <strong>of</strong> bigrams is very much less than the number<br />

<strong>of</strong> possible word pairs, which is the square <strong>of</strong> the number <strong>of</strong> word-types.<br />

(22) 42%sort -nr bigrams.cnt > bigrams.sct<br />

43%more bigrams.sct<br />

429 <strong>of</strong> the<br />

378 to be<br />

323 in the<br />

255 had been<br />

227 she had<br />

220 it was<br />

196 captain wentworth<br />

191 he had<br />

176 to the<br />

174 mr elliot<br />

164 she was<br />

148 could not<br />

147 lady russell<br />

134 he was<br />

131 sir walter<br />

129 <strong>of</strong> her<br />

127 all the<br />

125 i have<br />

123 i am<br />

117 have been<br />

114 she could<br />

112 <strong>of</strong> his<br />

112 and the<br />

111 for the<br />

109 they were<br />

96 to her<br />

96 that he<br />

96 did not<br />

95 <strong>on</strong> the<br />

94 to have<br />

91 a very<br />

90 <strong>of</strong> a<br />

89 would be<br />

88 it is<br />

84 that she<br />

122

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!