From 3d0fc9145f48e822e8fcbdf3279c68682220aaeb Mon Sep 17 00:00:00 2001
From: Bizcochito
Date: Sat, 7 May 2022 21:26:44 +0200
Subject: [PATCH] added a word not found allert to stderr when word is not in
dictionary
---
converter.lua | 3 +-
input.txt | 30 +++---
test.html | 262 +++++++++++++-------------------------------------
3 files changed, 83 insertions(+), 212 deletions(-)
diff --git a/converter.lua b/converter.lua
index fbe3a90..32cb9b7 100644
--- a/converter.lua
+++ b/converter.lua
@@ -125,7 +125,8 @@ function add_word(str)
end
end
if add then
- table.insert(word_list,str)
+ table.insert(word_list,str)
+ if not in_dictionary(str) then io.stderr:write("Error: \""..str.."\" is not known\n") end
end
end
diff --git a/input.txt b/input.txt
index ebf23c1..72ef736 100644
--- a/input.txt
+++ b/input.txt
@@ -13,31 +13,31 @@ LU'NYA
(po'nyash!)
ESH'NYUI
- ba yu e wawote to pu mipura lili'nya dre?
+ ba yu e wawote to pu mipura lili'nya dre?
r uwu
LU'NYA
relfur chu mya pu yu mya relfur lup apatka'nya faka'nya'pash ponme mya wawote polika'nya peekaka'nya'pash.
ESH'NYUI
- mi'shi'pash~
+ mi'shi'pashshu
balfur yu e ton polika'nya dre?
LU'NYA
- mishi'pash!!
- relfurla mya ton polika'nya yu meluton ka'nya!
+ mishi'pash!!
+ relfurla mya ton polika'nya yu meluton ka'nya!
balfurla yu dra?
ESH'NYUI
- relfurla yu esh'dre mya ton polika'nya yu puroton ka'nya~
- relfur yu shi'ro'bae'pu yu pon'ya ka'nya~
+ relfurla yu esh'dre mya ton polika'nya yu puroton ka'nyashu
+ relfur yu shi'ro'bae'pu yu pon'ya ka'nyashu
LU'NYA
puroton yu ponya ton ka'nya!
ESH'NYUI
be'nyui-rerenlafura yu meluton mimifaka'nya…
- relfur yu meluton mimiku'pash~
+ relfur yu meluton mimiku'pashshu
LU'NYA
o'o, relfur chu parefaka'nya…
@@ -45,23 +45,23 @@ LU'NYA
ESH'NYUI
uu, relfur yu naomiminku mya mimifuku mya ton ka'nya...
- relfur yu guraton to meluton mimifuku..
- relfur yu ton mimiku'pash~
+ relfur yu guraton to meluton mimifuku..
+ relfur yu ton mimiku'pashshu
LU'NYA
- ishi-balfur yu mishi'pash!
+ ishi-balfur yu mishi'pash!
balfur chu mya arilaen yu en ka'nya peekaka'nya fa'dre?
ESH'NYUI
i eshnyui_blush.png
- yesh-balfur yu mishi'pash~
+ yesh-balfur yu mishi'pashshu
(>///////////////<)
relfur yu ari'laen parefaka'nya, balfur yu pareka'nya dra?
LU'NYA
- relfur chu arilaen dedaka'nya.
- imanla rila shashka'nya'pash.
- imanla shoo chu ike to pikeshe ka'nya.
+ relfur chu arilaen dedaka'nya.
+ imanla rila shashka'nya'pash.
+ imanla shoo chu ike to pikeshe ka'nya.
/
relfur chu arilaenlan luka'nya'pash.
@@ -70,5 +70,5 @@ i eshnyui.png
arilaenla shoo chu pikeshe fuka'nya'bash dra?
LU'NYA
- gao chu relfur yu fayu kan'ya.
+ gao chu relfur yu fayu kan'ya.
relfur chu arilaen dedaka'nya.
diff --git a/test.html b/test.html
index 70d3ed4..d6a1878 100644
--- a/test.html
+++ b/test.html
@@ -455,14 +455,6 @@ ESH'NYUI
dre?
-
-
-
-
-
-
-
-
uwu
@@ -832,20 +816,20 @@ ESH'NYUI
- mi'shi'pash~
+ mi'shi'pashshu
- ~
+
@@ -976,14 +960,6 @@ LU'NYA
mishi'pash!!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ka'nya~
+ ka'nyashu
@@ -1346,10 +1298,10 @@ ESH'NYUI
- ~
+
@@ -1396,10 +1348,10 @@ ESH'NYUI
- ka'nya~
+ ka'nyashu
@@ -1446,10 +1398,10 @@ ESH'NYUI
- ~
+
@@ -1684,10 +1636,10 @@ ESH'NYUI
- mimiku'pash~
+ mimiku'pashshu
@@ -1718,10 +1670,10 @@ ESH'NYUI
- ~
+
@@ -2126,14 +2078,6 @@ ESH'NYUI
mimifuku..
-
-
-
-
-
-
-
-
- mimiku'pash~
+ mimiku'pashshu
@@ -2254,10 +2190,10 @@ ESH'NYUI
- ~
+
@@ -2312,14 +2248,6 @@ LU'NYA
mishi'pash!
-
-
-
-
-
-
-
-
- mishi'pash~
+ mishi'pashshu
@@ -2590,10 +2510,10 @@ ESH'NYUI
- ~
+
@@ -2800,14 +2720,6 @@ LU'NYA
dedaka'nya.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -3308,14 +3180,6 @@ LU'NYA
kan'ya.
-
-
-
-
-
-
-
-
lilinya
- |
-
-???
- |
-
-???
- |
-
-
-
-
- |
-
-
|
???
@@ -3812,10 +3654,10 @@ to think, to become aware
|
-
+
|
-mishipash
+mishipashshu
|
???
@@ -3836,6 +3678,20 @@ noun
|
color
+ |
+
+
+
+
+ |
+
+mishipash
+ |
+
+???
+ |
+
+???
|
@@ -4130,6 +3986,20 @@ modifier
adorable
+ |
+
+
+
+
+ |
+
+
+ |
+
+???
+ |
+
+???
|