Package: aksara
SummaryAksara is an Indonesian NLP tool that conforms to theUniversal Dependencies (UD) v2annotation guidelines. Aksara can performfive tasks:Word segmentation (tokenization)LemmatizationPOS taggingMorphological features analysisDependency ParsingThe output is in theCoNLL-U format.InstallationInstallFoma.a.  Linuxapt-get install foma-bin.Make sure you have the privilege to install package or  usesudo.b.  WindowsGet precompiled foma binary fromfoma-zipUnzip the precompiled foma binaryAdd the win32 folder path (from precompiled foma zip) to environment variable PATHc. MacOSbrew install foma[OPTIONAL] It is strongly recommended to use virtual environment (seevenvon how to create Python virtual environment using venv) to avoid dependency conflict.Use the package managerpipto install Aksara library.pip install aksaraUsageYou can use Aksara in command line or python programPython Library UsageAksara can be used as a Python library. See our docs for more information.Command Line UsageExample to process formal Indonesian text:foo@bar:$python3-maksara-s"Pengeluaran baru ini dipasok oleh rekening bank gemuk Clinton."#sent_id=1#text=PengeluaranbaruinidipasokolehrekeningbankgemukClinton.1	Pengeluaran	keluar	NOUN	_	Number=Sing	4	nsubj	_	Morf=peN+keluar<VERB>+an_NOUN2	baru	baru	ADJ	_	_	1	amod	_	Morf=baru<ADJ>_ADJ3	ini	ini	DET	_	PronType=Dem	1	det	_	Morf=ini<DET>_DET4	dipasok	pasok	VERB	_	Voice=Pass	0	root	_	Morf=di+pasok<VERB>_VERB5	oleh	oleh	ADP	_	_	6	case	_	Morf=oleh<ADP>_ADP6	rekening	rekening	NOUN	_	Number=Sing	4	obl	_	Morf=rekening<NOUN>_NOUN7	bank	bank	NOUN	_	Number=Sing	6	nmod	_	Morf=bank<NOUN>_NOUN8	gemuk	gemuk	ADJ	_	_	9	amod	_	Morf=gemuk<ADJ>_ADJ9	Clinton	Clinton	PROPN	_	_	6	appos	_	Morf=Clinton<PROPN>_PROPN10	.	.	PUNCT	_	_	4	punct	_	Morf=.<PUNCT>_PUNCTExample to process informal Indonesian text:foo@bar:$python3-maksara-s"Sering ngikutin gayanya lg nyanyi."--informal#sent_id=1#text=Seringngikutingayanyalgnyanyi.1	Sering	sering	ADV	_	_	2	advmod	_	Morf=sering<ADV>_ADV2	ngikutin	ikut	VERB	_	Polite=Infm|Voice=Act	0	root	_	Morf=NGE+ikut<VERB>+in_VERB3-4	gayanya	_	_	_	_	_	_	_	_3	gaya	gaya	NOUN	_	Number=Sing	2	obj	_	Morf=gaya<NOUN>_NOUN4	nya	nya	PRON	_	Number=Sing|Person=3|Poss=Yes|PronType=Prs	3	nmod	_	Morf=nya<PRON>_PRON5	lg	lagi	ADV	_	Abbr=Yes|Polite=Infm	6	advmod	_	Morf=lagi<ADV>_ADV6	nyanyi	nyanyi	VERB	_	Polite=Infm	2	ccomp	_	Morf=nyanyi<VERB>_VERB|SpaceAfter=No7	.	.	PUNCT	_	_	6	punct	_	Morf=.<PUNCT>_PUNCTAccepting text file as input and write to file.foo@bar:$python3-maksara-f"input_example.txt"--output"output_example.conllu"--informalProcessing inputs...100%|██████████████████████████████████████████████████| 5/5 [00:32<00:00,  6.45s/it]foo@bar:$DocumentationAksara as a Python LibraryAksara's documentation can be built locally.Clone our repository.Install required dependencies (requirements.txt and doc_requirements.txt).foo@bar: pip install -r requirements.txtfoo@bar: pip install -r doc_requirements.txtRun make.bat in docs folder.foo@bar: cd docsfoo@bar: make htmlThe html version of our documentation will be generated in _docs/build/html folder. Using your favorite browser, open index.html.Command Line UsageUse-s [SENTENCES]or--string [SENTENCES]to analyze a sentence.Use-f [FILE]or--file [FILE]to analyze multiple sentences in a file.Use--output [FILE]to select a file for the output. Otherwise, the output will be displayed in the standard output.Use--lemmaoption to get only the output of lemmatization task.Use--postagoption to get only the output of POS tagging task.Use--informaloption to use the informal word handler.Use--model [MODEL_NAME]option to use which dependency parser machine-learning model. The list below is the name of the model that can be used.FR_GSD-ID_CSUI(default)FR_GSD-ID_GSDIT_ISDT-ID_CSUIIT_ISDT-ID_GSDEN_GUM-ID_CSUIEN_GUM-ID_GSDSL_SSJ-ID_CSUISL_SSJ-ID_GSDPlease use option-hor--helpfor further documentation.AcknowledgmentsAksara conforms to the annotation guidelines for Indonesian dependency treebank proposed by Alfina et al. (2019) and Alfina et al. (2020)Aksara v1.0 was built by M. Yudistira Hanifmuti and Ika Alfina, as the reseach project for Yudistira's undergraduate thesis at Faculty of Computer Science, Universitas Indonesia in 2020.Aksara v1.1 was built by Muhammad Ridho Ananda and Ika Alfina, as the research project for Ridho's undergraduate thesis at Faculty of Computer Science, Universitas Indonesia in 2021. Aksara v1.1 uses a hybrid POS tagger method of Aksara and Hidden Markov Model (HMM) to do disambiguation.Aksara v1.2 was built by I Made Krisna Dwitama, Muhammad Salman Al Farisi, Ika Alfina, and Arawinda Dinakaramani as the research project for Krisna and Salman undergraduate thesis at Faculty of Computer Science, Universitas Indonesia in 2022. Aksara v1.2 improve the ability of the morphological analyzer in Aksara in order to be able to process informal Indonesian text.Aksara v1.3 was built by Andhika Yusup Maulana, Ika Alfina, and Kurniawati Azizah as the research project for Maulana's undergraduate thesis at the Faculty of Computer Science, Universitas Indonesia, in August 2022. Aksara v1.3 introduces a machine-learning-based dependency parser to fill the 7-8th column that previously left empty.ReferencesAndhika Yusup Maulana, Ika Alfina, and Kurniawati Azizah."Building Indonesian Dependency Parser Using Cross-lingual Transfer Learning". In Proceeding of the 2022 International Conference of Asian Language Processing (IALP).I Made Krisna Dwitama, Muhammad Salman Al Farisi, Ika Alfina, dan Arawinda Dinakaramani."Building Morphological Analyzer for Informal Text in Indonesian". In Proceeding of the ICACSIS 2022 (online).M. Ridho Ananda, M. Yudistira Hanifmuti, and Ika Alfina."A Hybrid of Rule-based and HMM-based POS Taggers for Indonesian". In Proceeding of the 2021 International Conference of Asian Language Processing (IALP)M. Yudistira Hanifmuti and Ika Alfina."Aksara: An Indonesian Morphological Analyzer that Conforms to the UD v2 Annotation Guidelines". In Proceeding of the 2020 International Conference of Asian Language Processing (IALP)  in Kuala Lumpur, Malaysia, 4-6 Desember 2020.Ika Alfina, Daniel Zeman, Arawinda Dinakaramani, Indra Budi, and Heru Suhartanto."Selecting the UD v2 Morphological Features for Indonesian Dependency Treebank". In Proceeding of the 2020 International Conference of Asian Language Processing (IALP)  in Kuala Lumpur, Malaysia, 4-6 Desember 2020.Ika Alfina, Arawinda Dinakaramani, Mohamad Ivan Fanany, and Heru Suhartanto."A Gold Standard Dependency Treebank for Indonesian". In  Proceeding of 33rd Pacific Asia Conference on Language, Information and Computation (PACLIC) 2019 in Hakodate, Japan, 13-15 September 2019.Changelog2022-10-21 v1.3added new flag--model [MODEL_NAME]added dependency parserintegrated existing flow with dependency parsing task2022-08-30 v1.2added informal lexicon, morphotactic rules, and morphophonemic rulesadded feature Polite=Infmfixed bugs2021-08-07 v1.1added the disambiguation for POS tag, lemma, and morphological featuresupdated lexiconremoved features: Subcat, NumForm, AdpType, VerbTypeadded feature NumTyperemoved feature values: Degree=Posfixed bugs2020-10-27 v1.0Initial release.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Contactika.alfina [at] cs.ui.ac.id