From 90a53d20ef8cd407567cd53bf87405881db67486 Mon Sep 17 00:00:00 2001 From: AHMAD RIZKY MAULANA SAMOSIR <202310715282@mhs.ubharajaya.ac.id> Date: Sat, 10 Oct 2026 06:48:19 +0000 Subject: [PATCH] Menambahkan kode PoS Tagging Bahasa Indonesia --- pos_tagging.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 pos_tagging.py diff --git a/pos_tagging.py b/pos_tagging.py new file mode 100644 index 0000000..87df8b0 --- /dev/null +++ b/pos_tagging.py @@ -0,0 +1,8 @@ + +import stanza +stanza.download('id') +nlp = stanza.Pipeline('id', processors='tokenize,pos') +doc = nlp("Budi sedang membaca buku sejarah di perpustakaan nasional.") +for sentence in doc.sentences: + for word in sentence.words: + print(f"{word.text:<15} | {word.upos:<15}")