commit 90a53d20ef8cd407567cd53bf87405881db67486 Author: AHMAD RIZKY MAULANA SAMOSIR <202310715282@mhs.ubharajaya.ac.id> Date: Sat Oct 10 06:48:19 2026 +0000 Menambahkan kode PoS Tagging Bahasa Indonesia 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}")