{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/hire-a-linguist-learning-endangered-languages","title":"Hire a Linguist!: Learning Endangered Languages with In-Context Linguistic Descriptions","arxiv_id":"2402.18025","date":"2024-02-28","proceeding":null,"authors":["Kexun Zhang","Yee Man Choi","Zhenqiao Song","Taiqi He","William Yang Wang","Lei LI"],"abstract":"How can large language models (LLMs) process and translate endangered languages? Many languages lack a large corpus to train a decent LLM; therefore existing LLMs rarely perform well in unseen, endangered languages. On the contrary, we observe that 2000 endangered languages, though without a large corpus, have a grammar book or a dictionary. We propose LINGOLLM, a training-free approach to enable an LLM to process unseen languages that hardly occur in its pre-training. Our key insight is to demonstrate linguistic knowledge of an unseen language in an LLM's prompt, including a dictionary, a grammar book, and morphologically analyzed input text. We implement LINGOLLM on top of two models, GPT-4 and Mixtral, and evaluate their performance on 5 tasks across 8 endangered or low-resource languages. Our results show that LINGOLLM elevates translation capability from GPT-4's 0 to 10.5 BLEU for 10 language directions. Our findings demonstrate the tremendous value of linguistic knowledge in the age of LLMs for endangered languages. Our data, code, and model generations can be found at https://github.com/LLiLab/llm4endangeredlang.","url_abs":"https://arxiv.org/abs/2402.18025v2","url_pdf":"https://arxiv.org/pdf/2402.18025v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"hire-a-linguist-learning-endangered-languages","repo_url":"https://github.com/leililab/lingollm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"hire-a-linguist-learning-endangered-languages","repo_url":"https://github.com/llilab/llm4endangeredlang","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}}],"tasks":[],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.18025","atlas_url":"https://app.syntology.ai/?focus=2402.18025","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.18025"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/llilab/llm4endangeredlang","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leililab/lingollm","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":1,"ran":7,"unverified":5},"by_repo_kind":{"official":{"samples":13,"ran":8,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":13,"samples":[{"code_sha256_prefix":"30da774c0f8a0676","entry":"check_dirs","repo":"leililab/lingollm","repo_kind":"official","path":"gen.py","file_url":"https://github.com/leililab/lingollm/blob/HEAD/gen.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"30da774c0f8a0676"}},{"code_sha256_prefix":"29ec22f0d27d611e","entry":"convert_to_underscore","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"fst_src/helpers.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/fst_src/helpers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"29ec22f0d27d611e"}},{"code_sha256_prefix":"8157b0711c048d1a","entry":"extract_enclosed_text","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"lingollm/prompts.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/lingollm/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8157b0711c048d1a"}},{"code_sha256_prefix":"574259fb71503801","entry":"join_words","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"fst_src/helpers.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/fst_src/helpers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"574259fb71503801"}},{"code_sha256_prefix":"fa9257629938eebf","entry":"match_score","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"fst_src/ilg_helpers.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/fst_src/ilg_helpers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fa9257629938eebf"}},{"code_sha256_prefix":"b58c65537e96ba58","entry":"prompt_direct_translate","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"lingollm/prompts.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/lingollm/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b58c65537e96ba58"}},{"code_sha256_prefix":"c22687ed59d1d97f","entry":"prompt_system","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"lingollm/prompts.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/lingollm/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c22687ed59d1d97f"}},{"code_sha256_prefix":"05d917a26d659ced","entry":"unique","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"fst_src/helpers.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/fst_src/helpers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"05d917a26d659ced"}},{"code_sha256_prefix":"0e208bbcdc29e798","entry":"copy_prompt_translate","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"lingollm/pipelines.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/lingollm/pipelines.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0e208bbcdc29e798"}},{"code_sha256_prefix":"96fa86c8caacc090","entry":"direct_translate","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"lingollm/pipelines.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/lingollm/pipelines.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"96fa86c8caacc090"}},{"code_sha256_prefix":"a5bac802f1de6944","entry":"filter_matching_glosses","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"fst_src/ilg_helpers.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/fst_src/ilg_helpers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a5bac802f1de6944"}},{"code_sha256_prefix":"072c586b35001aee","entry":"fst_to_story_gloss","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"fst_src/ilg_helpers.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/fst_src/ilg_helpers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"072c586b35001aee"}},{"code_sha256_prefix":"ece1a00a1f1f6b9b","entry":"get_llm_wrapper","repo":"llilab/llm4endangeredlang","repo_kind":"official","path":"lingollm/llms.py","file_url":"https://github.com/llilab/llm4endangeredlang/blob/HEAD/lingollm/llms.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ece1a00a1f1f6b9b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}