Added support for 25k freq wordlist for dictionary as an HTML page.
--- a/py/gadict_html.py Fri Jul 21 23:35:18 2023 +0300
+++ b/py/gadict_html.py Sat Jul 22 00:13:47 2023 +0300
@@ -20,6 +20,8 @@
ARG_LANG_RE = re.compile("-lang:(.+)")
# -freq:var:TAG=FILE or -freq:freq:TAG=FILE
ARG_FREQ_RE = re.compile("-freq:(freq|var):([^=]+)=(.+)")
+# -grp:GLOB
+ARG_GRP_RE = re.compile("-grp:(.+)")
look_for_files = False
for idx in range(1, len(sys.argv)):
@@ -50,6 +52,13 @@
wlist = parser.parse()
FREQ_SOURCES.append((tag, set(wlist)))
continue
+ m = ARG_GRP_RE.match(arg)
+ if m:
+ patt = m.group(1)
+ parser = gadict_freq.WordformGroupParser(patt)
+ for (tag, wset) in parser.parse().items():
+ FREQ_SOURCES.append((tag, wset))
+ continue
if arg.startswith("-"):
raise Exception("Unsupported option format: '{:s}'".format(arg))
if not FINAME: