Skip to content

Commit

Permalink
[Template merge] Process speller index*.xml files using autotools, an…
Browse files Browse the repository at this point in the history
…d replace hardcoded text with text from cofigure.ac. Requires giella-core 0.22.0.
  • Loading branch information
snomos committed Jan 29, 2024
1 parent e1d9c09 commit 2dbac51
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 57 deletions.
2 changes: 2 additions & 0 deletions m4/giella-config-files.m4
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ AC_CONFIG_FILES([Makefile \
tools/tokenisers/tests/Makefile \
tools/shellscripts/Makefile \
tools/spellcheckers/Makefile \
tools/spellcheckers/index.xml \
tools/spellcheckers/index.mobile.xml \
tools/spellcheckers/filters/Makefile \
tools/spellcheckers/neural/Makefile \
tools/spellcheckers/weights/Makefile \
Expand Down
2 changes: 1 addition & 1 deletion m4/giella-macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ AC_MSG_RESULT([$GIELLA_CORE])
###############################################################
### This is the version of the Giella Core that we require. ###
### UPDATE AS NEEDED.
_giella_core_min_version=0.21.1
_giella_core_min_version=0.22.0
# GIELLA_CORE/GTCORE env. variable, required by the infrastructure to find scripts:
AC_ARG_VAR([GIELLA_CORE], [directory for the Giella infra core scripts and other required resources])
Expand Down
28 changes: 0 additions & 28 deletions tools/spellcheckers/index.mobile.xml

This file was deleted.

22 changes: 22 additions & 0 deletions tools/spellcheckers/index.mobile.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<hfstspeller dtdversion="1.0" hfstversion="3">
<info>
<locale>@GLANG2@</locale>
<title>@SPELLER_NAME_ENG@ (mobile)</title>
<description>@SPELLER_DESC_ENG@. Mobile phone version.</description>
<version>@SPELLERVERSION@</version>
<date>DATE</date>
<producer>Giellatekno/Divvun/UiT contributors</producer>
<contact email="feedback@divvun.no" website="http://divvun.no"/>
</info>
<acceptor type="general" id="acceptor.default.hfst">
<title>@GLANGUAGE@ speller lexicon</title>
<description>@GLANGUAGE@ speller lexicon compiled with HFST.</description>
</acceptor>
<errmodel id="errmodel.default.hfst">
<title>@GLANGUAGE@ error model</title>
<description>Error model for @GLANGUAGE@, possibly with adaptions to mobile phone keyboards.</description>
<type type="default"/>
<model>errormodel.default.hfst</model>
</errmodel>
</hfstspeller>
28 changes: 0 additions & 28 deletions tools/spellcheckers/index.xml

This file was deleted.

22 changes: 22 additions & 0 deletions tools/spellcheckers/index.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<hfstspeller dtdversion="1.0" hfstversion="3">
<info>
<locale>@GLANG2@</locale>
<title>@SPELLER_NAME_ENG@</title>
<description>@SPELLER_DESC_ENG@.</description>
<version>@SPELLERVERSION@</version>
<date>DATE</date>
<producer>Giellatekno/Divvun/UiT contributors</producer>
<contact email="feedback@divvun.no" website="http://divvun.no"/>
</info>
<acceptor type="general" id="acceptor.default.hfst">
<title>@GLANGUAGE@ speller lexicon</title>
<description>@GLANGUAGE@ speller lexicon compiled with HFST.</description>
</acceptor>
<errmodel id="errmodel.default.hfst">
<title>@GLANGUAGE@ error model</title>
<description>Error model for @GLANGUAGE@.</description>
<type type="default"/>
<model>errormodel.default.hfst</model>
</errmodel>
</hfstspeller>

0 comments on commit 2dbac51

Please sign in to comment.