diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx | |
parent | Initial commit. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx new file mode 100644 index 00000000..f695b94b --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/src/stemmer/among.jsx @@ -0,0 +1,34 @@ +import "base-stemmer.jsx"; + +class Among +{ + var s_size : int; /* search string */ + var s : string; /* search string */ + var substring_i : int; /* index to longest matching substring */ + var result : int; /* result of the lookup */ + var instance : Nullable.<BaseStemmer> ; + /* object to invoke method on. It is a BaseStemmer */ + var method : Nullable.<(BaseStemmer) -> boolean>; + /* method to use if substring matches */ + + function constructor (s : string, substring_i : int, result : int) + { + this.s_size = s.length; + this.s = s; + this.substring_i = substring_i; + this.result = result; + this.method = null; + this.instance = null; + } + + function constructor (s : string, substring_i : int, result : int, + method : (BaseStemmer) -> boolean, instance : BaseStemmer) + { + this.s_size = s.length; + this.s = s; + this.substring_i = substring_i; + this.result = result; + this.method = method; + this.instance = instance; + } +} |