aboutsummaryrefslogtreecommitdiffstats
path: root/spo256/words.c
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2025-01-14 16:06:02 -0600
committerWilliam Harrington <kb0iic@berzerkula.org>2025-01-14 16:06:02 -0600
commit0cc9b20c15460213e488bf5e70963b941482f628 (patch)
treebb0143245583ec846630f39bfa2258dba640ccd7 /spo256/words.c
parent0e084ade5069756d487b5c948c48b777e37c00c9 (diff)
Add source.
Diffstat (limited to 'spo256/words.c')
-rw-r--r--spo256/words.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/spo256/words.c b/spo256/words.c
new file mode 100644
index 0000000..19c8d57
--- /dev/null
+++ b/spo256/words.c
@@ -0,0 +1,34 @@
+/*
+
+ Each line of input from the client application is examined and split
+ into words, numbers, abbreviations, and special catagories for further
+ translation from free-form text to SPO spoken speech. Generally a
+ word is a collection of characters grouped by white-space markers
+ (nl, tab, and space). Special consideration is also given to quoting
+ properties. Additional rules may be applied once words have been
+ catagorized.
+*/
+
+#include <other/string.h>
+#include <other/config.h>
+#include <std/string.h>
+#include "speak.h"
+
+void abbrev(char *str)
+{
+ char *p;
+
+ if(!lit && !spell)
+ p = find(aidx, str);
+
+ if(p)
+ spo_word(p);
+ else
+ {
+ p = tail(str);
+ *(--p) = 0;
+ spo_word(str);
+ spo_pause(P_SENTANCE);
+ }
+}
+