Professional Documents
Culture Documents
<head>
<meta charset="UTF-8">
<style>
body {
.container {
width: 80%;
margin: 0 auto;
h1 {
text-align: center;
textarea {
width: 100%;
height: 200px;
margin-bottom: 10px;
button {
padding: 10px;
border: none;
background-color: #4CAF50;
color: white;
font-weight: bold;
cursor: pointer;
button:hover {
background-color: #3E8E41;
#results {
margin-top: 20px;
#results p {
margin: 0;
</style>
</head>
<body>
<div class="container">
<textarea id="text"></textarea>
<div id="results"></div>
</div>
<script>
const dictionary = ["maqaan", "maqaa", "kee", "koo", "eenyuu", "bulte", "oolte", "jirtaa", "eessa",
"deemi", "taa'i", "ka'i", "akkam", "nagaa", "koottu", "harka", "lama", "mana", "sa'a", "nama", "buna",
"muka", "lafa", "guddaa", "xiqqoo", "harma", "mucaa", "kufe", "gummii", "barnoota", "wal",
"madessaa", "lafa", "qabsiisuuni", "hojiile", "hojii", "irraa", "olchuun", "barumsa", "hawaata", "ta’e",
"uummu", "fi", "hawaasa", "mana", "barumsa"];
/* we use const dictionary as corpus/Corpora so words out of this one will outputed as
misspelled.
*/
function checkSpelling() {
words.forEach((word) => {
if (!dictionary.includes(word.toLowerCase())) {
errors.push(word);
});
if (errors.length > 0) {
message += `<strong>${error}</strong> `;
});
resultsDiv.innerHTML = `<p>${message}</p>`;
} else {
</script>
</body>
</html>