N-gram Statistics Package v.0.5

PUC/SP, LAEL, CEPRIL, DIRECT


Para que serve

Este é um programa em Perl usado para fazer listas de n-gramas (multipalavras, 'chunks') de um corpus fornecido pelo usuário, com opção de produção de estatísticas (para bigramas, somente). Há outro programa semelhante ('ngrama') disponível neste site. NSP foi desenvolvido por Ted Pedersen e Satanjeev Banerjee.

Como usar

Formato das listas

As listas são fornecidas em dois formatos: simplificado e original. O formato simplificado é fruto da edição da lista original, feita aqui neste site. O programa nsp original não a fornece. A lista simplificada apenas apresenta os n-gramas e suas freqüências (e para bi-gramas, caso tenha sido selecionado, a estatística de associação).

O formato original é a listagem bruta do programa nsp, tal qual fornecida por ele. Abaixo vai a explicação, conforme retirada do README do programa.

Lista de freqüências:

line<>of<>text<>2 3 2 2 2 2 2 
and<>a<>third<>1 1 1 1 1 1 1 
third<>line<>of<>1 1 3 2 1 1 2 
second<>line<>and<>1 1 3 1 1 1 1 
line<>and<>a<>1 3 1 1 1 1 1 
a<>third<>line<>1 1 1 2 1 1 1 
text<>second<>line<>1 1 1 2 1 1 1 
of<>text<>second<>1 1 1 1 1 1 1 
first<>line<>of<>1 1 3 2 1 1 2 
"The seven numbers after each trigram in file test.cnt correspond respectively to f(0, 1, 2), f(0), f(1), f(2), f(0, 1), f(0, 2) and f(1, 2), as shown in the file freq_combo.txt". (source: README)

Lista de estatísticas:

11
of<>text<>1 1.0000 2 2 2
and<>a<>1 1.0000 1 1 1
a<>third<>1 1.0000 1 1 1
text<>second<>1 1.0000 1 1 1
line<>of<>2 0.8000 2 3 2
third<>line<>3 0.5000 1 1 3
line<>and<>3 0.5000 1 3 1
second<>line<>3 0.5000 1 1 3
first<>line<>3 0.5000 1 1 3

"Once again, the first number is the total number of bigrams - 11. On the next line is the highest ranked bigram "of<>text<>". The first number following this bigram, 1, is its rank. The next number, 1.0000, is its value computed using the dice statistic. The final three numbers are exactly the numbers associated with this ngram in the test.cnt file" (source: README).

Qual estatística devo usar?

Uma estatística amplamente usada em Lingüística de Corpus é 'Mutual Information'. Para saber mais a respeito, vide:
The Design, Implementation, and Use of the Ngram Statistics Package (Banerjee and Pedersen) - Appears in the Proceedings of the Fourth International Conference on Intelligent Text Processing and Computational Linguistics, February 17-21, 2003, Mexico City
|baixar pdf)|, na seção '5 Measures Association of Ngrams'.

Para maiores informações sobre o programa nsp, clique aqui.

A versão 0.5, instalada aqui, é de 4 de junho de 2002 e não é a mais recente do programa nsp.


Ajustes

Tamanho dos n-gramas:

Incluir estatísticas de associação? Disponível para bigramas, somente.

Qual estatística de associação?

Código do corpus (seis dígitos):



(c) cgi, sh, html Tony Berber Sardinha, 2004
nsp: Ted Pedersen, tpederse@d.umn.edu; Satanjeev Banerjee, bane0025@d.umn.edu, University of Minnesota, Duluth