HFST-PAIR-TEST(1)
π hfst-pair-test π
bestie. you clicked on the User Commands page for hfst-pair-test(1) and honestly? good choice. sit down, grab a strawberry, let's get into it π
β¨ NAME β¨
hfst-pair-test β pair test for a twolc rule file.
π¦ SYNOPSIS π¦
hfst-pair-test [OPTIONS...] [INFILE]
πΈ DESCRIPTION πΈ
pair test for a twolc rule file. that's the whole vibe. we run pair strings against your rules and see who's behaving and who is NOT π
π Common options:
-h,--helpβ print the help message, your lil map of everything πΊοΈ-V,--versionβ print version info, so everyone knows which era of the software you're living in-v,--verboseβ print verbosely while processing, aka it tells you EVERYTHING, main character energy-q,--quietβ only print fatal erros and requested output (yes "erros" is the canon spelling in here, we are not fixing her, we respect her π)-s,--silentβ alias of--quiet, same energy, different name π«Ά
π Input/Output options:
-i,--input=INFILEβ read input rule file from INFILE-o,--output=OUTFILEβ write test output to OUTFILE-N,--negative-testβ test fails if any of the pair strings is accepted. yes, backwards on purpose, it's giving chaos but it's correct π-X,--xerox-modeβ in xerox mode, test cases are harvested from a twolc source file
π Pair test options:
-I,--input-strings=SFILEβ read pair test strings from SFILE
okay so. if SFILE is missing, the test pair strings are read from STDIN. and if OUTFILE is missing, test output is written to STDOUT. classic, no cap.
The rule file is tested using correspondences given as pair strings, e.g. "e a r l y:i e r". Every pair string is tested using every rule and the program prints information about correspondences that are incorrectly allowed or disallowed. it's basically a vibe check for your rules β¨
The test pair string files contain one pair string/line. Lines where the first non-white-space character is "!" are considered comment lines and skipped. so you can leave lil notes for yourself, iconic.
π the three test modes π
There are three test modes: positive, negative and Xerox mode.
- In positive mode, all of the pair strings should be allowed.
- In negative mode they should be disallowed.
- In Xerox mode the cases are read from a twolc source file and both positive and negative cases can occur.
Ordinarily, positive test mode is in use. Option -N switches to negative test mode. The exit code for a successful test is 0. The exit code is 1 otherwise. A successful test will print "Test passed". A failing test prints "Test failed" and information about pair strings that are handled incorrectly.
In positive test mode (i.e. without option -N), if a pair string is not accepted, the names of the rules that reject it are printed as well as the positions in the string where the rules run out of possible transitions. In negative mode, only the strings that are allowed are printed. receipts, basically π§Ύ
In Xerox mode, the input should be a twolc file. Tests consist of two lines: an input form and an output form. The test cases are specialized comments prefixed with either '!!???' or '!!$' depeding on whether the pair should succeed or fail. An example of a positive test:
!!??? earlYer !!??? earlier
An example of a negative test:
!!$ earlYer !!$ earlyer
In silent mode (-s), the program won't print anything. Only the exit code tells whether the test was successful or not. mysterious. lowkey powerful. π€«
π REPORTING BUGS π
found something cursed? Report bugs to <hfst-bugs@helsinki.fi> or directly to our bug tracker at: <https://github.com/hfst/hfst/issues>
- hfst-pair-test home page: <https://github.com/hfst/hfst/wiki/HfstPairTest>
- General help using HFST software: <https://github.com/hfst/hfst/wiki>
β COPYRIGHT β
Copyright Β© 2017 University of Helsinki, License GPLv3: GNU GPL version 3 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. fr fr, zero warranty, none, don't come for her π
and that's the whole page bestie π this lil beauty comes to you from HFST, dated August 2018 β yes she's a 2018 baby and she still ate π go run your pair tests, you're doing amazing, periodt β¨π¦π
π¦ where this page comes from
- debian bookworm: hfst 3.16.0-5 Β· GPL-3.0-or-later
- debian trixie: hfst 3.16.2-1+b1 Β· GPL-3.0-or-later
- nixos 26.05: hfst 3.16.2
- opensuse-leap 16.0: hfst 3.16.0-bp160.1.11 Β· Apache-2.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND GPL-3.0-only
- ubuntu jammy: hfst 3.15.4-2 Β· GPL-3.0-or-later
- ubuntu noble: hfst 3.16.0-5build4 Β· GPL-3.0-or-later
- ubuntu questing: hfst 3.16.2-1
- ubuntu resolute: hfst 3.16.2-1build2 Β· GPL-3.0-or-later
- ubuntu stonking: hfst 3.17.1-6 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms