Orange: Corpus Viewer

From OnnoWiki
(Redirected from Corpus Viewer)
Jump to navigation Jump to search

Sumber: https://orange3-text.readthedocs.io/en/latest/widgets/corpusviewer.html

Widget Corpus Viewer menayangkan isi corpus

Input

Corpus: kumpulan dokumen.

Output

Corpus: Dokumen yang berisi word yang di minta.

Widget Corpus Viewer dimaksudkan untuk melihat file text (contoh corpus). Widget Corpus Viewer akan selalu menampilkan keluaran corpus. Jika Regexp filtering digunakan, widget hanya akan menampilkan dokumen yang cocok saja.

Corpus-Viewer-stamped.png


  • Information:
    • Documents: number of documents on the input
    • Preprocessed: if preprocessor is used, the result is True, else False. Reports also on the number of tokens and types (unique tokens).
    • POS tagged: if POS tags are on the input, the result is True, else False.
    • N-grams range: if N-grams are set in Preprocess Text, results are reported, default is 1-1 (one-grams).
    • Matching: number of documents matching the RegExp Filter. All documents are output by default.
  • RegExp Filter: Python regular expression for filtering documents. By default no documents are filtered (entire corpus is on the output).
  • Search Features: features by which the RegExp Filter is filtering. Use Ctrl (Cmd) to select multiple features.
  • Display Features: features that are displayed in the viewer. Use Ctrl (Cmd) to select multiple features.
  • Show Tokens & Tags: if tokens and POS tag are present on the input, you can check this box to display them.
  • If Auto commit is on, changes are communicated automatically. Alternatively press Commit.

Contoh

Widget Corpus Viewer dapat digunakan untuk menampilkan semua atau beberapa dokumen dalam corpus. Dalam contoh ini, pertama-tama kita akan me-load book-excerpts.tab, yang ada di add-on Text Mining, ke widget Corpus. Kemudian kita akan memproses text menjadi kata-kata, memfilter stopwords, membuat bi-gram dan menambahkan tag POS (lebih lanjut tentang preprocessing dalam widget Preprocess Text. Sekarang kita ingin melihat hasil preprocessing. Di widget Corpus Viewer kita dapat melihat, berapa banyak keunikannya token yang kami dapatkan dan apa adanya (centang Show Token & Tag). Karena kita juga menggunakan tagger POS untuk menampilkan label bagian-of-speech, label tersebut akan ditampilkan di samping token di bawah text.

Sekarang kita akan mem-filter hanya dokumen yang membahas tentang Bill. Kami menggunakan regular expression \ bBill \ b untuk menemukan dokumen yang hanya berisi kata Bill. Anda dapat menampilkan dokumen yang cocok atau tidak cocok, melihatnya di widget Corpus Viewer lain atau menganalisis lebih lanjut.

Corpus-Viewer-Example.png

Referensi

Pranala Menarik