Dogfennaeth API Gwirio Sillafu a Gramadeg

Spelling and Grammar Checking API Documentation


Wedi'i bweru gan Cysill, gall yr API hwn adnabod unrhyw wallau sillafu neu wallau gramadegol gan gynnwys camdreigladau gan awgrymu’r cywiriadau priodol. Powered by Cysill, this API can find any spelling, general grammatical errors as well as incorrect mutation errors, and then inform why the error is considered to be incorrect and provide corrections.

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

Check

Gwirio

https://api.techiaith.cymru/cysill/v2/

Paramedr Math Disgrifiad
Field Type Description
text String Y testun i'w wirio The text to check
lang Enum ("en", "cy"), Default="cy" Iaith yr ymateb Language of the response
format Enum ("text", "html"), Default="text" Fformat y testun yn y mewnbwn Text input format
max_errors Integer, Default=10 Y nifer uchaf o wallau i ymddangos Max number of errors to display
accept_english Boolean, Default=true Derbyn geiriau Saesneg mewn testun Cymraeg Accept English words in Welsh text

Enghraifft:

Example:

                        
                            GET

curl https://api.techiaith.cymru/cysill/v2/?text=mae+hen+gwlad+fy+tadau&lang=cy&format=text&max_errors=10&accept_english_words=true

curl https://api.techiaith.cymru/cysill/v2/?text=%3Cdiv%20class%3D%22myClass%22%3E%3Cstrong%3Emae%20hen%20%3Ci%3Egwlad%3C%2Fi%3E%20fy%3C%2Fstrong%3E%3Cspan%20style%3D%22color%3A%20red%3B%22%3Etadau%3C%2Fspan%3E%3C%2Fdiv%3E&lang=en&format=html&max_errors=5&accept_english=false

POST

curl -q -H "Content-Type: application/json" -d '{"text":"helo byd", "accept_english": false}' 'https://api.techiaith.cymru/cysill/v2/'

JSON Data

{
    "text": "<div class=\"elementToProof\" style=\"font-family: &quot;Arial&quot;, &quot;Helvetica&quot;, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);\">helo byd</div>",
    "format": "html",
    "lang": "cy",
    "max_errors": 10,
    "accept_english": true
}
                        
                    

Canlyniad Enghreifftiol:

Example Result:

                        
                             {
    "success": false,
}

                        
                    

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

Gwirio

Check

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

Paramedr Math Disgrifiad
Field Type Description
text String Y testun i'w wirio The text to check
max_errors Integer Y nifer o wallau i ymddangos The number of errors to show

Enghraifft:

Example:

                        
                            curl https://api.techiaith.cymru/cysill/v1/?text=mae+hen+gwlad+fy+tadau&max_errors=10
                        
                    

Canlyniad Enghreifftiol:

Example Result:

                        
                            {
"version": 1,
"success": true, 
"result": 
    [
        {
            "start": 4, 
            "length": 9, 
            "isSpelling": false, 
            "message": "Mae 'hen' yn achosi treiglad meddal", 
            "suggestions": [
                "hen wlad"
            ]
        }, 
        {
            "start": 14, 
            "length": 8, 
            "isSpelling": false, 
            "message": "Mae 'tadau' yn treiglo'n drwynol ar \u00f4l 'fy'", 
            "suggestions": [
                "fy nhadau"
            ]
        }
    ]
}
                        
                    

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