The value of a zero-downtime custom dictionary compared with other analyzers
Most Korean morphological analyzers require you to rebuild the dictionary or restart the analyzer to change the custom dictionary.
Bareun detects file changes in the custom dictionary directory in real time and applies them immediately without stopping the server when a dictionary file changes.
In production services where domain terms keep growing, or in multi-tenant environments where several customers or teams each use their own dictionaries,
this zero-downtime update makes a big difference to analysis quality and operational stability.
Dictionary update methods compared
| Item | Bareun | Analyzers that need a dictionary rebuild |
|---|---|---|
| Applying a dictionary | Zero-downtime reload as soon as the file changes | Recompile and restart required |
| Watching method | Immediate file-change detection + 60-second periodic check | Manual deployment |
| Downtime | None | Can occur during the restart |
| Multiple dictionaries | Specify several at once with custom_dict_names, with priority | Usually a single dictionary |
| Conflict check | CheckConflict checks for duplicate and conflicting entries | Separate |
Why zero-downtime updates matter
When you restart an analysis server, requests are dropped or delayed in the meantime. For a service that must update its dictionary often, restarts become an accumulating operational burden. With Bareun, the server rereads a file on its own once the file changes, so you can safely grow the dictionary while the service is running.
Do users change the files directly?
The custom dictionary is changed through the CustomDictionaryService API (UpdateCustomDictionary and others).
The files in the server's dictionary directory are in a binary format managed by the server, so users do not edit them directly as text.
We recommend keeping the word list in your own source (for example, a list managed in Git) and applying it through the API. The custom dictionary can be shared across multiple machines, so if you run several Bareun services, changing the dictionary on just one server is reflected on all the other servers in near real time.
How it works
Bareun watches the custom dictionary directory for file creation, modification, and deletion (Write/Create/Remove).
When it detects a change, it reloads the dictionary. A 60-second periodic monitor also runs as a backup to prevent missed changes.
The settings and behavior of zero-downtime updates are covered in more detail in Real-time custom dictionary updates.
graph TD EDIT[Dictionary file modified] --> WATCH[File change detected]; WATCH --> RELOAD[Zero-downtime reload]; RELOAD --> READY[Applied from the next request]; TIMER[60-second periodic monitoring] --> RELOAD;
You can register several kinds of custom dictionaries.
| Dictionary | Target |
|---|---|
np_set | Proper noun (NP) |
cp_set | Compound noun (CP) |
cp_caret_set | Compound noun split-point marking (CP^) |
vv_set | Verb (VV) |
va_set | Adjective (VA) |
mm_set | Determiner (MM) |
mag_set | Adverb (MAG) |
ic_set | Interjection (IC) |
Multi-tenancy: several dictionaries at once
With Bareun, each analysis request can specify several dictionaries at once through custom_dict_names, and the dictionary listed first takes priority.
You can keep separate dictionaries per customer or domain and pick the combination you need at request time, which makes it easy to serve several tenants from one server.
Custom dictionaries in general are covered in Exploring the custom dictionary.
You can also use CheckConflict to check ahead of time whether the same headword appears in several dictionaries (NP/CP/CP^/VV/VA) and conflicts, or whether a single dictionary contains duplicates. As a dictionary grows, these checks protect operational quality.
Notes on comparison
Other analyzers also support custom dictionaries, but how changes are applied (whether a rebuild is needed), and support for multiple dictionaries and conflict checks, differ from tool to tool.
Check each tool's version and documentation for specific behavior. This page describes behavior based on Bareun.
Related documents
- Real-time custom dictionary updates: zero-downtime update settings
- Reducing OOV words with a custom dictionary: improving analysis quality with a dictionary
- Bareun vs Mecab-ko: differences from analyzers that need a dictionary rebuild
Frequently asked questions
Q. Do I have to restart the server after changing the dictionary?
No. Bareun detects file changes in the dictionary directory in real time and rereads them without downtime when a file changes.
Changes apply from the next request, with no restart.
Q. Can I use a different dictionary for each customer?
Yes. Each request can specify several dictionaries through custom_dict_names, and the dictionary listed first takes priority.
One server can run the dictionaries of several tenants separately.
Q. What happens when dictionaries conflict?
CheckConflict lets you check ahead of time for duplicates within a dictionary and conflicts between dictionaries. If the same headword appears in several part-of-speech dictionaries at once, it is reported as a conflict, so you can fix it before registering.
Q. Can I edit the dictionary files directly as text?
No. The files in the server's dictionary directory are in a binary format managed by the server, so do not edit them directly.
Keep the word list in your own source (for example, a list managed in Git) and apply it through the UpdateCustomDictionary API of CustomDictionaryService. When you update through the API, Bareun detects the change and applies it from the next request without downtime.