Named-Entity Recognition using anaGo
According to Wikipedia, Named-entity recognition (NER) (also known as entity identification, entity chunking and entity extraction) is a…
Named-Entity Recognition using anaGo
According to Wikipedia, Named-entity recognition (NER) (also known as entity identification, entity chunking and entity extraction) is a subtask of information extraction that seeks to locate and classify named entity mentioned in unstructured text into pre-defined categories such as person names, organizations, locations, medical codes, time expressions, quantities, monetary values, percentages, etc.
In my very first time as a data scientist, I have no idea what a Named-Entity Recognition (NER) is. I was just told that NER can automatically find names of people, organizations, places, and many more. My first question as a newbie was, “How am I gonna do that?”.
A few months later, I finally can make a simple program that can automatically identified several entities using a python library called anaGo.
anaGo is a Python library for sequence labeling(NER, PoS Tagging,…), implemented in Keras.
anaGo can solve sequence labeling tasks such as named entity recognition (NER), part-of-speech tagging (POS tagging), semantic role labeling (SRL) and so on. Unlike traditional sequence labeling solver, anaGo don’t need to define any language dependent features. Thus, we can easily use anaGo for any languages.
Here is the github link of anaGo. https://github.com/Hironsan/anago

anaGo demo https://anago.herokuapp.com/
What do we have to prepare to make this program finally detected entities?
First of all, I prepared several Indonesian news and saved it in a text file. That’s it? Well, no, of course. The problem is, we have to change the whole text into a new format which is called as a BIO format. anaGo can only detect a B- and I- format and the rest is up to you.
For example, we’re gonna annotate a location. The text we have before changing it to BIO format is :
My name is Veni and I live in DKI Jakarta.
We’re gonna change the sentence above into a BIO format, so it’ll turn like this:
My _ 0
name 0 is 0 Veni B-PER and 0 I 0 live 0 in 0 DKI B-LOC Jakarta _ I-LOC
You can just make a small script to change your original text into a BIO format as shown above or you can just simply use an application called WebAnno (here is the link to WebAnno: https://webanno.github.io/webanno/).

WebAnno
After we finish annotating each word in our text, we can finally move on to the next step that is training the file we’ve prepared! I go through 300 iterations to train the file. I named the variable bola (which means: ball in Bahasa) because the text I used contains news about football.

After the training finished, we can save the model. Now, we can use the model to analyze a new sentence or text and find the entities in it.

Analyze a new text

The result given after we analyze the text
In this program, I made 4 entities there are ORG for Organization, PER for Person, LOC for Location, and QTY for Quantity. We notice that the model didn’t find so many entities eventhough it should’ve detected it. It must be because we didn’t trained it that much or we didn’t have enough text to train.
Those are the simple way how we automatically find names of people, places, and organizations using anaGo. I hope this simple article will help you through your journey on Named-Entity Recognition!
메타데이터
- post_id
- d67771390d2d
- slug
- named-entity-recognition-using-anago-d67771390d2d
- url
- https://medium.com/@venikputri/named-entity-recognition-using-anago-d67771390d2d
- canonical_url
- https://medium.com/@venikputri/named-entity-recognition-using-anago-d67771390d2d
- author_url
- https://medium.com/@venikputri
- status
- ok
- fetched_at
- 2026-07-29 07:49:46