Dogfennaeth API Cyfieithu Peirianyddol

Machine Translation API Documentation


API cyfieithu peirianyddol er mwyn cyfieithu testunau rhwng y Gymraeg a'r Saesneg. Mae rhai modelau wedi'u hoptimeiddio i ddarparu cyfieithiadau gwell ar gyfer testunau o wahanol feysydd megis Iechyd, Gofal Cymdeithasol a Deddfwriaeth. Use the machine translation API to translate texts between Welsh and English. Some models are optimized to provide better translations for text from various domains such as Health, Social Care and Legislation.

API Fersiwn 2 (v2) API Version 2 (v2)

Cyfieithu

Translate

https://api.techiaith.cymru/translate/v2/models/{model}/translate

Paramedr Math Disgrifiad
Field Type Description
engine Enum ("Meddalwedd", "Deddfwriaeth", "CofnodYCynulliad") Enw'r peiriant cyfieithu parth benodol Name of domain specific translation engine
target Enum ("en", "cy") Y testun i'w gyfieithu Text requiring translating
source Enum ("en", "cy") Iaith y testun ffynhonnell Source text's language

Enghraifft:

Example:

                        
                            curl "https://api.techiaith.cymru/translate/v2/models/health/translate/?text=The+doctor+is+ready+to+see+you+now"
                        
                    

Canlyniad Enghreifftiol:

Example Result:

                        
                            {
    "translations":
    [
        {
            "source_lang":"en",
            "target_lang":"cy",
            "translation_text":"Mae'r meddyg yn barod i'ch gweld chi nawr"
        }
    ]
}
                        
                    

API Fersiwn 1 (v1) API Version 1 (v1)

Cyfieithu

Translate

https://api.techiaith.cymru/translate/v1/

Paramedr Math Disgrifiad
Field Type Description
text String Y testun i'w gyfieithu Text to translate
model Enum ("health", "legislation") Enw'r peiriant cyfieithu parth benodol Name of domain specific translation engine

Enghraifft:

Example:

                        
                            curl -F "https://api.techiaith.cymru/translate/v1/?engine=CofnodYCynulliad&source=en&target=cy&q=Thanks+you+for+your+question+regarding+health+services+in+Gwynedd"
                        
                    

Canlyniad Enghreifftiol:

Example Result:

                        
                            {
    "translatedText": "diolch ichi am eich cwestiwn ynghylch gwasanaethau iechyd yng Ngwynedd"
}

                        
                    

Cookies

Briwsion


We use cookies to improve your experience and enable recording your voice.

Rydym yn defnyddio briwsion i wella eich profiad a galluogi recordio eich llais

Accept & Continue Derbyn a Pharhau

Need to learn more? Privacy & Cookie Policy

Angen dysgu mwy? Preifatrwydd a Pholisi Briwsion