opensanctions / opensanctions/poliloom

Handle Buddhist Era calendar dates from Thai sources

Open
#148 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

loom
Dominant language
Python
Stars
22
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Thai Wikipedia articles use Buddhist Era (BE) dates throughout (BE = CE + 543). When extracting position start/end dates from Thai sources, the LLM outputs BE years directly (e.g., 2548 instead of 2005), which are then stored as-is.

Wikidata uses Gregorian (CE) dates, so these need to be converted at some point.

Options to consider:

  • Detect and convert in the date validation/parsing layer (e.g., years > ~2400 from Thai sources)
  • Instruct the LLM to convert to Gregorian during extraction
  • Post-processing step based on source language context

This likely affects other non-Gregorian calendar systems too (Iranian/Solar Hijri, etc.).

Observed with: วิทยา บุตรดีวงค์ (Q61118212) — position date extracted as 2548 instead of 2005.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the date validation/parsing layer and the extraction flow for Thai sources, then reproduce the observed วิทยา บุตรดีวงค์ case. Decide where calendar conversion belongs, document how source language context and other non-Gregorian calendars are handled, and verify that BE 2548 is stored as CE 2005.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, internationalization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.