Nkrane-MT Inference Noun Phrase Marker (nkrane-mt-marker-en)

ghanaopenai/nkrane-mt-marker-en is a fine-tuned token classification model for detecting and bracketing concrete noun phrases and named entities in English text at inference time.

It is a component of the Nkrane-MT translation pipeline developed by GhanaOpenAI.


πŸ’‘ Role in Nkrane-MT

In Nkrane-MT, translation models are trained with dual-sided bracketed entity preservation:

  • Concrete noun phrases, organizations, compound titles, and demographic groups are marked with angle brackets <...> on the English input (e.g. The <president of Ghana> visited the <regional hospital>.).
  • The seq2seq translation model directly preserves these bracketed terms on the Asante Twi target (e.g. <president of Ghana> no kΙ”sra <regional hospital> no.).
  • Abstract concepts (information, development, peace, justice, patience) are translated freely and naturally into Twi.

nkrane-mt-marker-en automates the input-side marking in $< 5\text{ ms}$, taking raw English text and placing <...> around targeted concrete entities so users can provide natural English without manual tagging.


πŸ“Š Evaluation Metrics

Trained across all 763,594 sentence pairs of the nkrane-mt-parallel-corpus-eng-twi dataset:

Metric Score
F1 Score 0.8139
Token Accuracy 94.70%
Precision 80.85%
Recall 81.93%
Inference Latency < 5 ms

πŸš€ Quickstart & Usage

1. Python Inference with nkrane_mt

from nkrane_mt.marker import NounPhraseMarker

# Load the trained marker model
marker = NounPhraseMarker(method="model", model_name_or_path="ghanaopenai/nkrane-mt-marker-en")

raw_text = "The president of Ghana visited the Ministry of Finance and the regional hospital in May 2026."
marked_text, phrases = marker.mark(raw_text)

print("Raw English:    ", raw_text)
print("Marked English: ", marked_text)
print("Detected Phrases:", phrases)

# Output:
# Raw English:     The president of Ghana visited the Ministry of Finance and the regional hospital in May 2026.
# Marked English:  The <president of Ghana> visited the <Ministry of Finance> and the <regional hospital> in <May 2026>.
# Detected Phrases: ['president of Ghana', 'Ministry of Finance', 'regional hospital', 'May 2026']

πŸ‹οΈ Training Setup


πŸ“– Citation & Repository

@misc{nkrane_mt_marker_2026,
  author = {Owusu, S. and GhanaOpenAI Contributors},
  title = {Nkrane-MT: Lightweight Token Classifier for Concrete Noun Phrase & Entity Marking},
  year = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/ghanaopenai/nkrane-mt-marker-en}}
}
Downloads last month
24
Safetensors
Model size
66.4M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ghanaopenai/nkrane-mt-marker-en

Finetuned
(12,885)
this model

Evaluation results