├── .envrc
├── .gitignore
├── LICENSE
├── README.md
├── abbr.def
├── abbr.kbd
├── abbr.tsv
├── abbr.yml
├── abbrgen.py
├── alt.tsv
├── combos.dtsi
├── effort_calculator.py
├── engram-chorded.kbd
├── espanso-text-expansion.py
├── flake.lock
├── flake.nix
├── kanata-chorded.py
├── layout.py
├── macros.dtsi
├── qmk-chorded.py
├── requirements.txt
├── runall.sh
├── trained.txt
├── training.py
├── training.txt
├── utils.py
├── words.ods
├── words.tsv
└── zmk-chorded.py
/.envrc:
--------------------------------------------------------------------------------
1 | use flake
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.direnv
2 | __pycache__
3 | /venv
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # abbrgen
2 |
3 | Abbreviation generator for chording and text expansion
4 |
5 | Every day, we find ourselves typing commonly used words repetitively, consuming time and effort. Text expansion offers a solution by allowing us to replace these frequently used words with unique abbreviations, thereby saving keystrokes. For instance, typing 't' with a trigger key could automatically generate 'the '. The objective isn't to abbreviate every word, but rather to focus on those that offer significant savings for the effort invested in memorization. Ideally you also want the abbreviations to be the most comfortable effort wise for your particular keyboard layout (qwerty, colemak, canary etc).
6 |
7 | However, compiling such a list manually can be a daunting task. This is where abbrgen comes in handy, it helps by automating the generation of the initial list and streamlines the process of importing them into different tools, so you can enhance and customize them over time.
8 |
9 | Given a list of common words it can generate a list like the following, the way you input each word and alternate word depends on if you are using chording or text expansion
10 |
11 | | Word | Abbreviation | Alt1 | Alt2 | Alt3 |
12 | | ---- | ------------ | ----- | ------ | ------- |
13 | | look | l | looks | looked | looking |
14 | | give | ge | gives | gave | giving |
15 |
16 | ## Chording vs text expansion
17 |
18 | Chording involves pressing multiple keys at the same time, while text expansion is typing as usual followed by a trigger key. There are pros and cons of each approach to consider:
19 |
20 | ### Chording Pros and Cons
21 |
22 | - Quicker since the time taken is about the same as a single key press
23 | - Can take time to get used to pressing multiple keys together
24 | - Heavier on the fingers especially if you have heavy key switches
25 |
26 | ### Text Expansion Pros and Cons
27 |
28 | - More possible combinations since you can use abbreviations that reverse and repeat letters
29 | - Easier to set up with a standard keyboard
30 | - Can be buggy with some programs due to the way it replaces text
31 | - Can be a security issue at work since it captures key presses and might need administrator privilages to install
32 |
33 | ### Chording
34 |
35 | The approach it takes with combos is to define combo, shift, and alt1/2 keys that are pressed in combination with the abbreviation to get the desired output. These keys work well on the thumbs to ensure all the abbreviations are possible to press with them. There are some extra combos to help with punctuation.
36 |
37 | | Input | Output |
38 | | ------------------------------- | ----------------------- |
39 | | l + combo | look`` |
40 | | l + combo + shift | Look`` |
41 | | l + combo + alt1 | looked`` |
42 | | l + combo + alt2 | looking`` |
43 | | l + combo + alt1 + alt2 | looks`` |
44 | | l + combo + shift + alt1 + alt2 | Looks`` |
45 | | . + combo | ``.`` |
46 | | , + combo | ``,`` |
47 | | ; + combo | ``;`` |
48 |
49 | This is how I have set up my 4 key thumb cluster from left to right:
50 |
51 | - alt1 (normally tab on tap or my navigation/number/symbol layer on hold, with hold preferred setting)
52 | - alt2 (normally space on tap or my media/function layer on hold, with tap preferred setting)
53 | - shift (normally backspace on tap or shift on hold, with hold preferred setting)
54 | - combo (normally delete word, this is great when making mistakes while learning)
55 |
56 | ### Text Expansion
57 |
58 | The approach it takes with text expansion is to define a trigger which you type after the abbreviation. The default trigger is `,;`. Read below about setting up a trigger key so you can automate typing this on one key. Alternate versions and punctuation is accessed by adding an extra suffix after the abbreviation.
59 |
60 | | Input | Output |
61 | | ------------- | ---------------- |
62 | | l`` | look`` |
63 | | lq`` | looked`` |
64 | | lj`` | looking`` |
65 | | lz`` | looks`` |
66 | | L`` | Look`` |
67 | | L.`` | Look.`` |
68 | | L,`` | Look,`` |
69 | | L;`` | Look;`` |
70 |
71 | ## Setup
72 |
73 | Clone the repo `git clone https://github.com/dlip/abbrgen.git` and change to the directory with `cd abbrgen`
74 |
75 | ### Python
76 |
77 | - Install [Python 3.11+](https://www.python.org/downloads/)
78 | - Run `pip install -r requirements.txt`
79 |
80 | ### Nix (Alternative to Python setup)
81 |
82 | If you have [Nix](https://nixos.org/download) you can run `nix develop` to get into a shell with Python and the required dependencies. If you have [direnv](https://direnv.net/docs/installation.html) also, you can run `direnv allow` instead to have the dependencies available as soon as you change to the directory.
83 |
84 | ### Running
85 |
86 | To run the commands use `python `
87 |
88 | ## Commands
89 |
90 | ### abbrgen.py
91 |
92 | This reads `words.tsv` and outputs abbreviations in tsv format to `abbr.tsv`:
93 |
94 | The approach it uses is:
95 |
96 | - Generate all combinations of the letters in the word which start with the first letter and keep the order from left to right
97 | - Reject abbreviations it has already used
98 | - Reject abbreviations that are shorter than a minimum amount of characters or don't provide a minimum percentage improvement over typing the full word
99 | - Score remaining abbreviations by effort and select the best option depending on your particular keyboard layout and if you are using chorded mode
100 | - Add alt versions
101 | - Use [alt.tsv](./alt.tsv) if available, else:
102 | - Add verb tenses and plurals using [pattern](https://github.com/clips/pattern)
103 |
104 | There are some options that you might want to change near the top of [abbrgen.py](abbrgen.py). In particular set `chorded_mode` to `True` or `False` depending on what method you are using.
105 |
106 | ### training.py
107 |
108 | This generates a [training.txt](training.txt) file from `abbr.tsv` for you to copy a line of 10 words at a time into a typing practice tool like [Monkeytype](https://monkeytype.com/) custom mode to help learn the abbreviations:
109 |
110 | ```
111 | the and you have that for with this not but
112 | t a y h th f w ti n b
113 | ```
114 |
115 | ### qmk-chorded.py
116 |
117 | This is a chorded importer for [QMK](https://qmk.fm) which is a firmware for custom keyboards.
118 |
119 | You can check my config [here](https://github.com/dlip/qmk_firmware/tree/dlip/keyboards/mushi/keymaps/dlip) for reference
120 |
121 | - Setup combos as per this [gboards guide](https://combos.gboards.ca/docs/install/)
122 | - Add definitions for KC_COMBO, KC_COMBO_SFT, KC_COMBO_ALT1, KC_COMBO_ALT2 thumb keys to your `keymap.c`. Feel free to change the actions here to whatever works for you. If you have other special keys on your letters eg. home row mods, add definitions for these also so they can be referred to in the script. Use these in your keymap.
123 | - Move the `#include "g/keymap_combo.h"` line below all your definitions
124 |
125 | ```
126 | // Other definitions
127 |
128 | #define KC_COMBO_ALT1 LT(1, KC_TAB)
129 | #define KC_COMBO_ALT2 LT(2, KC_SPC)
130 | #define KC_COMBO_SFT MT(MOD_LSFT, KC_BSPC)
131 | #define KC_COMBO C(KC_BSPC)
132 |
133 | #include "g/keymap_combo.h"
134 | ```
135 |
136 | - Open [qmk-chorded.py](qmk-chorded.py) and ensure `key_map` matches any other custom definitions you may have
137 | - Run `python qmk-chorded.py`
138 | - It will generate `abbr.def` which you need to copy to your QMK keymap directory
139 | - Add `#include "abbr.def"` to the top of your QMK `combos.def` file
140 | - Flash your keyboard
141 |
142 | ### zmk-chorded.py
143 |
144 | This is a chorded importer for [ZMK](https://zmk.dev/) which is a firmware for custom keyboards.
145 |
146 | You can check my config [here](https://github.com/dlip/zmk-sweep/blob/main/config/cradio.keymap) for reference
147 |
148 | - Open [zmk-chorded.py](zmk-chorded.py) and ensure `key_positions` matches all the key positions on your keyboard
149 | - Run `python zmk-chorded.py`
150 | - It will generate `macros.dtsi` and `combos.dtsi` which you can then copy to your zmk keymap directory
151 | - Include these lines in your zmk keymap keymap file
152 |
153 | ```
154 | macros {
155 | #include "macros.dtsi"
156 | };
157 |
158 | combos {
159 | compatible = "zmk,combos";
160 | #include "combos.dtsi"
161 | };
162 | ```
163 |
164 | - Include these lines in your zmk keymap conf file, you may have to increase `CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY` if you are able to fit more combos on your controller
165 |
166 | ```
167 | CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=512
168 | CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=10
169 | CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=10
170 | ```
171 |
172 | - Flash your keyboard
173 |
174 | ### kanata-chorded.py
175 |
176 | This is a chorded importer for [Kanata](https://github.com/jtroo/kanata) which is a software keyboard remapper. It uses the experimental chords v2 feature which requires at least Kanata v1.6.1.
177 |
178 | Be aware that many keyboards, especially laptop ones do not support having many keys held at the same time. You can check what combinations work for your one [here](https://www.mechanical-keyboard.org/key-rollover-test/)
179 |
180 | - Open [kanata-chorded.py](kanata-chorded.py) and customize the `mapping` dictionary with your base mappings and the combo etc. keys
181 | - Run `python kanata-chorded.py` and copy [abbr.kbd](./abbr.kbd) to your keymap directory
182 | - Follow the example in [engram-chorded.kbd](./engram-chorded.kbd) and update your keymap
183 | - Add `concurrent-tap-hold yes` to the `defcfg` section
184 | - Add `(include abbr.kbd)`
185 | - Run `sudo kanata -c `
186 |
187 | ### espanso-text-expansion.py
188 |
189 | This is a text expansion importer for [Espanso](https://espanso.org)
190 |
191 | It reads `abbr.tsv` and generates `abbr.yml` which you can then copy to `~/.config/espanso/match/`. The yaml file is quite verbose since it adds multiple matches for all the possible suffixes, so you'll probably want to make any changes to `abbr.tsv` then run this command again.
192 |
193 | Here are some settings you might want to change:
194 |
195 | ```python
196 | # suffix to add to the end of an abbreviation to trigger the expansion
197 | expand_trigger = ",;"
198 | # suffix to add before the trigger to use the alternate forms in `abbr.tsv`
199 | alt_suffix_1 = "q"
200 | alt_suffix_2 = "j"
201 | alt_suffix_3 = "z"
202 | ```
203 |
204 | It might be preferable to disable `undo_backspace` in `~/.config/espanso/config/default.yml` in case you want to backspace without loosing the whole word
205 |
206 | ```
207 | undo_backspace: false
208 | ```
209 |
210 | The `abbr.yml` file is very verbose, so if you want to add/update words I recommend reading on so you can edit `abbr.tsv` then generate the file again from that.
211 |
212 | ### Setting up a trigger key for text expansion
213 |
214 | Having to type 2 characters eg. ',;' reduces the improvement gain considerably, especially for shorter words. You can bind a key on your keyboard that you don't usually use eg. right alt, caps lock via softwarwe or programmable keyboard firmware
215 |
216 | #### Kanata (software)
217 |
218 | Install [Kanata](https://github.com/jtroo/kanata) and add this alias to your config. You and then bind `@tgr` to a key of your choosing.
219 |
220 | ```
221 | (defalias
222 | tgr (macro , ;)
223 | )
224 | ```
225 |
226 | #### ZMK (firmware)
227 |
228 | Add this macro to your config, then you can bind `&tgr` to a key
229 |
230 | ```
231 | macros {
232 | ZMK_MACRO (tgr,
233 | wait-ms = <30>;
234 | tap-ms = <40>;
235 | bindings = <&kp COMMA &kp SEMI>;
236 | )
237 | };
238 | ```
239 |
240 | #### QMK (firmware)
241 |
242 | Add this custom keycode to your config, then you can bind `TGR` to a key
243 |
244 | ```
245 | enum custom_keycodes {
246 | TGR = SAFE_RANGE,
247 | };
248 |
249 | bool process_record_user(uint16_t keycode, keyrecord_t *record) {
250 | switch (keycode) {
251 | case TGR:
252 | if (record->event.pressed) {
253 | SEND_STRING(",;");
254 | }
255 | break;
256 | }
257 | return true;
258 | };
259 | ```
260 |
261 | ## Credits
262 |
263 | - [English frequency list](https://tmh.conlang.org/word-frequency/)
264 |
--------------------------------------------------------------------------------
/abbr.tsv:
--------------------------------------------------------------------------------
1 | the t
2 | and a
3 | you y
4 | have h has had having
5 | that th
6 | your yr yours
7 | can c
8 | but b
9 | will w
10 | they te
11 | this ti
12 | which wh
13 | say s says said saying
14 | make m makes made making
15 | their tr theirs
16 | also as
17 | use u uses used using
18 | when we
19 | other o
20 | take ta takes took taking
21 | would wo
22 | get g gets got getting
23 | good gd
24 | people p peoples
25 | know k knows knew knowing
26 | year ya years
27 | its i
28 | more me
29 | some se
30 | there the
31 | then tn
32 | where whe
33 | think tk thinks thought thinking
34 | come ce comes came coming
35 | what wa
36 | find f finds found finding
37 | these ts
38 | could co
39 | first ft
40 | very v
41 | include ie includes included including
42 | only on
43 | day d days
44 | just j
45 | give ge gives gave giving
46 | such sh
47 | many ma
48 | should so
49 | well wl
50 | area ae areas
51 | need n needs needed needing
52 | most ms
53 | city ct cities
54 | image ia images
55 | look l looks looked looking
56 | high hi
57 | life le lives
58 | while wi
59 | because ba
60 | thing thi things
61 | become bo becomes became becoming
62 | however he
63 | part pa parts
64 | great ga
65 | work wk works worked working
66 | large la
67 | small sl
68 | country cn countries
69 | even e
70 | study sd studies
71 | follow fo follows followed following
72 | system ste systems
73 | different de
74 | leave lea leaves leaved leaving
75 | place pe places
76 | help hp helps helped helping
77 | run r runs ran running
78 | child ch children
79 | number ne numbers
80 | much mh
81 | call ca calls called calling
82 | tell tl tells told telling
83 | water wae water
84 | service si services
85 | town to towns
86 | government gt governments
87 | keep ke keeps kept keeping
88 | family fa families
89 | still sti
90 | several sr
91 | feel fe feels felt feeling
92 | start sat starts started starting
93 | consider cs considers considered considering
94 | name na names
95 | important ir
96 | provide pi provides provided providing
97 | step sp steps
98 | world wd worlds
99 | local lc
100 | lead ld leads led leading
101 | after ar
102 | home ho homes
103 | before br
104 | issue iu issues
105 | group gr groups
106 | every er
107 | write wie writes wrote writing
108 | might mi
109 | result ru results
110 | information in information
111 | hold hd holds held holding
112 | state sae states
113 | process pr processes
114 | bring bn brings brought bringing
115 | serve ser serves served serving
116 | level lv levels
117 | another ah
118 | minute mn minutes
119 | member mr members
120 | about ao
121 | method mo methods
122 | point pt points
123 | hand hn hands
124 | woman woa women
125 | hour hu hours
126 | never nr
127 | must mu
128 | allow alo allows allowed allowing
129 | increase ic increases increased increasing
130 | live li lives lived living
131 | play py plays played playing
132 | party pat parties
133 | something sn somethings
134 | always als
135 | datum da data
136 | second sec
137 | base bs bases based basing
138 | line ln lines
139 | create cr creates created creating
140 | next nx
141 | order or orders
142 | problem po problems
143 | little lte
144 | really rea
145 | understand ue understands understood understanding
146 | train tai trains
147 | build bd builds built building
148 | often otn
149 | believe bl believes believed believing
150 | offer ofr offers offered offering
151 | death dah deaths
152 | person pes people
153 | example ex examples
154 | power per powers
155 | long lo
156 | continue cu continues continued continuing
157 | require rei requires required requiring
158 | house hse houses
159 | free fr
160 | both bh
161 | choose che chooses chose choosing
162 | region ren regions
163 | friend fi friends
164 | again ain
165 | speak sk speaks spoke speaking
166 | effect ect effects
167 | receive rec receives received receiving
168 | early ey
169 | community cm communities
170 | business bu businesses
171 | station sai stations
172 | young yn
173 | possible pie
174 | research rsa research
175 | change cha changes
176 | school sch schools
177 | those ths
178 | turn tu turns turned turning
179 | although ath
180 | value va values
181 | involve io involves involved involving
182 | month mnh months
183 | like lk likes liked liking
184 | grow gw grows grew growing
185 | company cy companies
186 | activity act activities
187 | develop do develops developed developing
188 | report ret reports reported reporting
189 | night nht nights
190 | kill ki kills killed killing
191 | political pc
192 | available aie
193 | reach rac reaches reached reaching
194 | stand san stands stood standing
195 | major mj
196 | election eti elections
197 | event ev events
198 | type ty types
199 | game gm games
200 | energy eny energies
201 | right rit rights
202 | health hea healths
203 | public pu
204 | condition cd conditions
205 | learn lan learns learnt learning
206 | development dn developments
207 | money my monies
208 | least lat
209 | yourself ys
210 | cause cae causes caused causing
211 | since sie
212 | position pst positions
213 | return rtn returns returned returning
214 | remain rai remains remained remaining
215 | appear ape appears appeared appearing
216 | close cle
217 | candidate cai candidates
218 | paper par papers
219 | control cnt controls
220 | light lit lights
221 | boat bt boats
222 | himself hie
223 | experience ein experiences
224 | language lu languages
225 | history hy histories
226 | idea id ideas
227 | support su supports supported supporting
228 | interest int interests
229 | together toh
230 | describe des describes described describing
231 | material mae materials
232 | especially eci
233 | island isn islands
234 | happen han happens happened happening
235 | apply aly applies applied applying
236 | accord aco
237 | locate lca locates located locating
238 | though thu
239 | until un
240 | today toa todays
241 | body by bodies
242 | animal ail animals
243 | therefore thf
244 | reduce reu reduces reduced reducing
245 | source src sources
246 | relate rat relates related relating
247 | course cos courses
248 | reason ran reasons
249 | social sca
250 | century cen centuries
251 | project pet projects
252 | field fie fields
253 | cover cv covers covered covering
254 | fact fc facts
255 | interview iv interviews
256 | improve ime improves improved improving
257 | village vae villages
258 | campaign can campaigns
259 | office oic offices
260 | action atn actions
261 | current crt
262 | response rsn responses
263 | human hma
264 | almost aos
265 | goal gl goals
266 | represent rst represents represented representing
267 | market mk markets
268 | carry cay carries carried carrying
269 | force fre forces
270 | view vw views
271 | performance pm performances
272 | expect ext expects expected expecting
273 | perform pf performs performed performing
274 | various vo
275 | full fu
276 | factor fat factors
277 | publish pih publishes published publishing
278 | network nk networks
279 | population pai populations
280 | marry mar marries married marrying
281 | usually uy
282 | obtain oai obtains obtained obtaining
283 | period pri periods
284 | kind kd kinds
285 | property prt properties
286 | already aed
287 | strong stn
288 | analysis ays analyses
289 | determine dei determines determined determining
290 | product pct products
291 | leader lad leaders
292 | father fh fathers
293 | media mia medias
294 | visit vt visits visited visiting
295 | center cnr centers
296 | anything ahi anythings
297 | music msi musics
298 | form fm forms
299 | probably pb
300 | court cot courts
301 | spend sen spends spent spending
302 | enter ent enters entered entering
303 | nothing nhi nothings
304 | space spa spaces
305 | remove rem removes removed removing
306 | suggest sg suggests suggested suggesting
307 | similar sir
308 | Figure fir Figures
309 | park pk parks
310 | risk rk risks
311 | addition adi additions
312 | website wb websites
313 | white whi
314 | produce pce produces produced producing
315 | piece pic pieces
316 | international ito
317 | account aon accounts
318 | military mir
319 | common con
320 | amount amn amounts
321 | mother mhe mothers
322 | national ntl
323 | approach aoh approaches
324 | daughter dhe daughters
325 | present prs presents presented presenting
326 | surface sue surfaces
327 | airport aro airports
328 | affect aet affects affected affecting
329 | application aict applications
330 | enough enh
331 | certain cti
332 | patient pit patients
333 | article atie articles
334 | compare cma compares compared comparing
335 | remember rmb remembers remembered remembering
336 | option oin options
337 | decision dis decisions
338 | policy poi policies
339 | identify idn identifies identified identifying
340 | former fme
341 | student sut students
342 | police poc polices
343 | girl gi girls
344 | video vd videos
345 | difference den differences
346 | flight fih flights
347 | someone sme someones
348 | connect cnet connects connected connecting
349 | restaurant reta restaurants
350 | price prc prices
351 | focus foc focuses focussed focussing
352 | prepare prea prepares prepared preparing
353 | environment evt environments
354 | sometimes sot
355 | break bra breaks broke breaking
356 | popular poa
357 | contain cni contains contained containing
358 | operate ort operates operated operating
359 | program pg programs
360 | route rut routes
361 | design dsn designs
362 | relationship rin relationships
363 | solution soi solutions
364 | claim cli claims claimed claiming
365 | table tab tables
366 | short sho
367 | specie sci species
368 | propose pos proposes proposed proposing
369 | church chu churches
370 | feature fea features
371 | watch wc watches watched watching
372 | function fn functions
373 | distance dsa distances
374 | capital ctl capitals
375 | class cls classes
376 | share sha shares shared sharing
377 | temperature teu temperatures
378 | effort eft efforts
379 | whole who
380 | security sct securities
381 | previous pis
382 | actually aty
383 | ground gn grounds
384 | production pot productions
385 | organization ori organizations
386 | decide dec decides decided deciding
387 | structure suc structures
388 | arrive aiv arrives arrived arriving
389 | technology tch technologies
390 | join ji joins joined joining
391 | occur ou occurs occurred occurring
392 | summer sur summers
393 | record rco records
394 | drive dve drives drove driving
395 | travel tav travels travelled travelling
396 | specific seci
397 | moment men moments
398 | black bla
399 | release reas releases released releasing
400 | president pset presidents
401 | location lin locations
402 | everything evh everythings
403 | brother bth brethren
404 | associate aste associates associated associating
405 | difficult du
406 | instead ista
407 | prevent pret prevents prevented preventing
408 | address ades addresses addrest addressing
409 | range rag ranges
410 | situation sui situations
411 | significant snc
412 | industry iut industries
413 | morning min mornings
414 | establish etah establishes established establishing
415 | attention aen attentions
416 | beach bah beaches
417 | select sle selects selected selecting
418 | exist exs exists existed existing
419 | avoid aod avoids avoided avoiding
420 | resource rso resources
421 | disease diea diseases
422 | official oil officials
423 | training trai trainings
424 | traditional tain
425 | particular pac
426 | likely ly
427 | color col colors
428 | natural ntu
429 | statement sam statements
430 | knowledge kne knowledge
431 | degree deg degrees
432 | border bor borders
433 | voice vie voices
434 | opportunity oy opportunities
435 | regard reg regards regarded regarding
436 | culture cut cultures
437 | single sil
438 | simple smp
439 | necessary nay
440 | explain eli explains explained explaining
441 | indicate idc indicates indicated indicating
442 | treatment tean treatments
443 | achieve ahv achieves achieved achieving
444 | nature nue natures
445 | direction dcn directions
446 | observe obs observes observed observing
447 | impact imc impacts
448 | itself itf
449 | announce ance announces announced announcing
450 | growth gh growths
451 | computer cue computers
452 | window wid windows
453 | without wu
454 | match mch matches
455 | American aeri
456 | protect pro protects protected protecting
457 | stage sag stages
458 | tourist tris tourists
459 | style stl styles
460 | themselves thv
461 | private pate
462 | general gea
463 | education eui educations
464 | resident rest residents
465 | content cont contents
466 | story sty stories
467 | board boa boards
468 | message msae messages
469 | chance chn chances
470 | strategy sey strategies
471 | practice paie practices
472 | special seia
473 | around and
474 | province pice provinces
475 | below blo
476 | recently rey
477 | currently cey
478 | authority ahy authorities
479 | season son seasons
480 | economic ecm
481 | multiple mue
482 | active acv
483 | environmental enl
484 | vehicle vh vehicles
485 | choice chi choices
486 | ticket tke tickets
487 | generally gna
488 | conduct cnu conducts conducted conducting
489 | directly dy
490 | personal pesa
491 | technique tehi techniques
492 | mention mio mentions mentioned mentioning
493 | mountain moa mountains
494 | beautiful bf
495 | challenge chae challenges
496 | traffic trf traffics
497 | device dvi devices
498 | operation orn operations
499 | management mane managements
500 | character chat characters
501 | finally fia
502 | purpose pue purposes
503 | section seti sections
504 | pressure psu pressures
505 | evidence evn evidences
506 | famous fao
507 | investigate ivt investigates investigated investigating
508 | climate cate climates
509 | easily eay
510 | promote pme promotes promoted promoting
511 | algorithm aith algorithms
512 | front fnt fronts
513 | influence iun influences
514 | connection ceti connections
515 | introduction irc introductions
516 | detail del details
517 | particularly ptu
518 | further fhe
519 | discuss dsc discusses discussed discussing
520 | individual inv individuals
521 | movement mon movements
522 | destination dso destinations
523 | warning wai warnings
524 | nuclear near
525 | introduce iuc introduces introduced introducing
526 | behavior bv behaviors
527 | appoint aoit appoints appointed appointing
528 | perhaps pha
529 | simply sly
530 | machine mhi machines
531 | subject sj subjects
532 | original onl
533 | variety vy varieties
534 | player pay players
535 | concern cner concerns
536 | complete com completes completed completing
537 | citizen citn citizens
538 | investigation inea investigations
539 | king kg kings
540 | check ck checks checked checking
541 | positive pite
542 | expression ersi expressions
543 | final fna
544 | sound sun sounds
545 | potential ptia
546 | communication cnat communications
547 | element elnt elements
548 | effective ecv
549 | attempt amp attempts
550 | maintain main maintains maintained maintaining
551 | express exr expresses expressed expressing
552 | photo pht photos
553 | ability ailt abilities
554 | measure msr measures measured measuring
555 | district disc districts
556 | surround suo surrounds surrounded surrounding
557 | presence psc presences
558 | visitor vto visitors
559 | painting pag paintings
560 | myself mye
561 | happy hpy
562 | pattern patr patterns
563 | discover dio discovers discovered discovering
564 | physical phs
565 | finish fnh finishes finished finishing
566 | everyone evy everyones
567 | manage mag manages managed managing
568 | confirm cnm confirms confirmed confirming
569 | parameter pmr parameters
570 | central cera
571 | component cmne components
572 | round run rounds
573 | picture piu pictures
574 | north noh
575 | mainly may
576 | Spanish sih
577 | contribute cru contributes contributed contributing
578 | recognize rcie recognizes recognized recognizing
579 | future fut futures
580 | marriage maie marriages
581 | signal snl signals
582 | mostly mos
583 | foreign fen
584 | object obt objects
585 | green gen
586 | explore exl explores explored exploring
587 | daily day
588 | officer ofi officers
589 | modern mrn
590 | governor gv governors
591 | urban urb
592 | minister mns ministers
593 | society scet societies
594 | customer csm customers
595 | encourage enur encourages encouraged encouraging
596 | meeting mein meetings
597 | length leg lengths
598 | track trk tracks
599 | supply sul supplies
600 | infection inet infections
601 | discussion diu discussions
602 | blood bod bloods
603 | serious seiu
604 | reaction reti reactions
605 | demonstrate don demonstrates demonstrated demonstrating
606 | global gla
607 | skill ski skills
608 | previously pey
609 | target tag targets
610 | museum mus museums
611 | collection cln collections
612 | evaluate ealt evaluates evaluated evaluating
613 | reference rfn references
614 | crime crm crimes
615 | highly hig
616 | branch ban branches
617 | mechanism mhs mechanisms
618 | facility fy facilities
619 | complex cx
620 | consist csit consists consisted consisting
621 | regular rega
622 | successful suce
623 | platform paf platforms
624 | couple cou couples
625 | ready ray
626 | maybe mb
627 | measurement mear measurements
628 | forest fot forests
629 | drink dik drinks
630 | interesting ints
631 | garden gad gardens
632 | concentration ceai concentrations
633 | respond resn responds responded responding
634 | soldier sol soldiers
635 | Russian rui
636 | advantage avn advantages
637 | responsible rnie
638 | heavy hey
639 | generate get generates generated generating
640 | weight wgh weights
641 | worker wke workers
642 | concept cept concepts
643 | phone phe phones
644 | completely cty
645 | transport tras transports
646 | nearly nry
647 | guide gie guides
648 | incident ince incidents
649 | newspaper nesa newspapers
650 | distribution dsu distributions
651 | relation ratn relations
652 | independent inde
653 | northern nthe
654 | purchase pch purchases purchased purchasing
655 | recommend rom recommends recommended recommending
656 | combine cmie combines combined combining
657 | council cul councils
658 | additional aton
659 | numerous nuo
660 | European eurp
661 | background bad backgrounds
662 | downtown dow downtowns
663 | hospital hoi hospitals
664 | interaction inra interactions
665 | victim vct victims
666 | primary pim
667 | economy ecny economies
668 | yesterday yet yesterdays
669 | document due documents
670 | apartment arten apartments
671 | benefit bnt benefits
672 | professional psia
673 | respect rect respects
674 | taxis tx taxes
675 | conference cfe conferences
676 | director dco directors
677 | federal fra
678 | replace rpac replaces replaced replacing
679 | south suh souths
680 | analyze anle analyzes analyzed analyzing
681 | passenger pasr passengers
682 | weather wah weathers
683 | memory mry memories
684 | total tol
685 | collect clet collects collected collecting
686 | importance irac importances
687 | protein prti proteins
688 | bottom bom bottoms
689 | capacity caty capacities
690 | construction cnst constructions
691 | belong bon belongs belonged belonging
692 | immediately idl
693 | capture catr captures captured capturing
694 | requirement rent requirements
695 | approximately ax
696 | southern shn
697 | glass gls glasses
698 | negative nv
699 | generation gai generations
700 | decade dca decades
701 | outcome out outcomes
702 | investment ines investments
703 | frequency frc frequencies
704 | presidential psta
705 | declare dcae declares declared declaring
706 | fully fuy
707 | instance insa instances
708 | participate patc participates participated participating
709 | penalty pty penalties
710 | relatively rty
711 | ferry fey ferries
712 | respectively rsy
713 | characteristic chte characteristics
714 | violence vic violences
715 | resolution rstn resolutions
716 | majority maj majorities
717 | injury ijr injuries
718 | chief chf chiefs
719 | unknown uow
720 | evening evni evenings
721 | financial fac
722 | anyone ayo anyones
723 | critical crit
724 | Chinese chie
725 | journalist ja journalists
726 | overall ova
727 | refuse rfu refuses refused refusing
728 | appropriate arot
729 | audience ainc audiences
730 | employ ely employs employed employing
731 | objective oiv objectives
732 | useful uel
733 | version von versions
734 | handle hnd handles handled handling
735 | estimate esim estimates estimated estimating
736 | suppose supe supposes supposed supposing
737 | administration anst administrations
738 | healthy hty
739 | protest prts protests
740 | reflect reft reflects reflected reflecting
741 | opposition osit oppositions
742 | pretty pry
743 | university uv universities
744 | principle prie principles
745 | parking pki parkings
746 | significantly scat
747 | furthermore fho
748 | husband hsd husbands
749 | digital dig
750 | journey jr journeys
751 | forward fora
752 | chemical chia
753 | contact coat contacts
754 | resistance rsia resistances
755 | failure fue failures
756 | conflict cft conflicts
757 | birth brt births
758 | basis bas bases
759 | decrease dcas decreases decreased decreasing
760 | interested intr interests interested interesting
761 | survive sure survives survived surviving
762 | literature ltu literatures
763 | calculate calt calculates calculated calculating
764 | comfortable cale
765 | excellent exc
766 | novel nvl novels
767 | extend exn extends extended extending
768 | display dsl displays displayed displaying
769 | sentence sent sentences
770 | aircraft aift aircrafts
771 | county cny counties
772 | French fnc
773 | efficiency efic efficiencies
774 | expensive exv
775 | request reut requests
776 | sight sgh sights
777 | television tvn televisions
778 | improvement ivet improvements
779 | possibly psy
780 | spring sig springs
781 | responsibility rsni responsibilities
782 | destroy dey destroys destroyed destroying
783 | consumption cnsi consumptions
784 | implement ilet implements implemented implementing
785 | landscape lase landscapes
786 | clinical clia
787 | mission misn missions
788 | employee empy employees
789 | perspective psei perspectives
790 | typically tyl
791 | budget but budgets
792 | thousand thsa thousands
793 | religion rig religions
794 | variable val variables
795 | strength steh strengths
796 | selection secn selections
797 | dollar dol dollars
798 | association asci associations
799 | prefer pef prefers preferred preferring
800 | agreement aget agreements
801 | medical meca
802 | extremely exm
803 | politics pits politicss
804 | festival feta festivals
805 | cluster cstr clusters
806 | theory toy theories
807 | widely wy
808 | competition coti competitions
809 | coach coh coaches
810 | institution iuo institutions
811 | cultural cutr
812 | software sota software
813 | fruit fui fruit
814 | reduction ruo reductions
815 | eventually evta
816 | thank thk thanks thanked thanking
817 | organize orai organizes organized organizing
818 | neighborhood neih neighborhoods
819 | murder mur murders
820 | combination coai combinations
821 | initial inal
822 | slowly soy
823 | otherwise othi
824 | detection deci detections
825 | regional rona
826 | finger fin fingers
827 | historical hisa
828 | exactly exa
829 | expand exd expands expanded expanding
830 | procedure pur procedures
831 | Australian asrn
832 | difficulty dcu difficulties
833 | crowd cow crowds
834 | certainly cry
835 | intervention into interventions
836 | equipment euit equipment
837 | stick stk sticks stuck sticking
838 | specifically seca
839 | religious rgs
840 | context ctx contexts
841 | regulation rgt regulations
842 | perfect pft
843 | deliver dlv delivers delivered delivering
844 | football fba footballs
845 | Italian itln
846 | category coy categories
847 | preserve pser preserves preserved preserving
848 | assessment asent assessments
849 | reporter rpot reporters
850 | commercial cora
851 | enhance enha enhances enhanced enhancing
852 | publication puc publications
853 | forget fg forgets forgot forgetting
854 | unless unl
855 | simulation siao simulations
856 | standard sand standards
857 | brain brn brains
858 | possibility pbt possibilities
859 | German grn
860 | examine exan examines examined examining
861 | English eish
862 | gather gah gathers gathered gathering
863 | settlement slet settlements
864 | comparison cars comparisons
865 | appearance arnc appearances
866 | execute ecut executes executed executing
867 | transfer traf transfers
868 | protection ptci protections
869 | worry woy worries worried worrying
870 | whatever whae
871 | battle btl battles
872 | surgery sge surgeries
873 | originally oina
874 | friendly fry
875 | spatial satl
876 | lawyer law lawyers
877 | cycle cyl cycles
878 | accident aden accidents
879 | license lies licenses
880 | grant gnt grants granted granting
881 | suddenly sny
882 | restore rsto restores restored restoring
883 | researcher resc researchers
884 | pronounce pou pronounces pronounced pronouncing
885 | convert cnv converts converted converting
886 | advance adv advances advanced advancing
887 | manager manr managers
888 | experiment erim experiments
889 | variation vati variations
890 | frequently fty
891 | mouth moh mouths
892 | volume vle volumes
893 | strange stg
894 | agricultural agit
895 | farmer fam farmers
896 | percent perc percents
897 | Israeli iael
898 | British bsh
899 | inform ifm informs informed informing
900 | billion bln billions
901 | height heg heights
902 | formation fon formations
903 | transportation troi transportations
904 | clothes cths clothess
905 | Click cik clicks clicked clicking
906 | contribution cntr contributions
907 | integrate igt integrates integrated integrating
908 | conversation cnsa conversations
909 | freedom frm freedoms
910 | wonder wde wonders wondered wondering
911 | architecture ahie architectures
912 | cloud cld clouds
913 | channel chan channels
914 | session sion sessions
915 | tourism tuis tourisms
916 | biological bola
917 | industrial idsa
918 | threaten than threatens threatened threatening
919 | sustainable stb
920 | dedicate dica dedicates dedicated dedicating
921 | terminal tnal terminals
922 | fashion fah fashions
923 | judge jd judges
924 | average avg
925 | participant paic participants
926 | slightly shy
927 | weekend wkd weekends
928 | schedule sche schedules scheduled scheduling
929 | install isal instals installed installing
930 | stock sck stocks
931 | possession posi possessions
932 | attraction acon attractions
933 | density dsy densities
934 | confidence cfi confidences
935 | powerful prf
936 | contractor cotr contractors
937 | essential estia
938 | comment comn comments
939 | emergency emg emergencies
940 | characterize chti characterizes characterized characterizing
941 | household hue households
942 | intelligence ign intelligences
943 | civil cvl
944 | profile pfi profiles
945 | exposure exsr exposures
946 | danger dng dangers
947 | dangerous dnu
948 | exercise excs exercises
949 | highlight hgt highlights highlighted highlighting
950 | button bun buttons
951 | breakfast brs breakfasts
952 | plastic pasc plastics
953 | clearly ceay
954 | expert exp experts
955 | inspire ispr inspires inspired inspiring
956 | justice jt justices
957 | politician pota politicians
958 | package pke packages
959 | observation osra observations
960 | library lby libraries
961 | arrange ange arranges arranged arranging
962 | youth yoh youths
963 | consequence cons consequences
964 | largely laey
965 | alternative aive alternatives
966 | exchange exh exchanges
967 | compose cmse composes composed composing
968 | somewhat seha
969 | trouble tule troubles
970 | careful caef
971 | compound cmu compounds
972 | arrival aivl arrivals
973 | historic hist
974 | predict prct predicts predicted predicting
975 | magazine mgi magazines
976 | evaluation evu evaluations
977 | strongly ston
978 | portrait prai portraits
979 | commonly cmy
980 | accuracy acry accuracies
981 | properly poy
982 | consumer cnsr consumers
983 | housing hui housings
984 | voltage vlt voltages
985 | anywhere ayhe
986 | reality reay realities
987 | adjust ajt adjusts adjusted adjusting
988 | shopping shin shoppings
989 | subsequently suet
990 | fourth fuh
991 | leadership lead leaderships
992 | territory tery territories
993 | award awd awards awarded awarding
994 | Japanese jn
995 | composition cost compositions
996 | eliminate einat eliminates eliminated eliminating
997 | expedition extn expeditions
998 | prisoner pior prisoners
999 | carefully cuy
1000 | nearby nby
1001 | suitable sitl
1002 | afternoon aftn afternoons
1003 | accompany acmn accompanies accompanied accompanying
1004 | injure inj injures injured injuring
1005 | alcohol acoh alcohols
1006 | emission emsn emissions
1007 | creation crin creations
1008 | conclude cnde concludes concluded concluding
1009 | portion poti portions
1010 | ingredient iget ingredients
1011 | description desi descriptions
1012 | album abm albums
1013 | occupy ouy occupies occupied occupying
1014 | constant cosa
1015 | beneficial bnf
1016 | atmosphere atoh atmospheres
1017 | impossible iosl
1018 | distribute dsb distributes distributed distributing
1019 | satisfy saty satisfies satisfied satisfying
1020 | pathway path pathways
1021 | boundary bay boundaries
1022 | residential resta
1023 | construct cstu constructs constructed constructing
1024 | CHAPTER chap CHAPTERs
1025 | hundred hun hundreds
1026 | biography boh biographies
1027 | maximum mx
1028 | celebrate cerat celebrates celebrated celebrating
1029 | indicator inda indicators
1030 | valley vay valleys
1031 | supporter surt supporters
1032 | closely csy
1033 | experimental exta
1034 | illegal iega
1035 | monitor mnir monitors monitored monitoring
1036 | assistance astce assistances
1037 | obviously oul
1038 | circumstance cirs circumstances
1039 | entirely enty
1040 | scientific sceti
1041 | clothing cthn clothings
1042 | matrix max matrices
1043 | struck srk strikes struck striking
1044 | neither nith
1045 | yellow yew
1046 | progress pge progress
1047 | accessible acsl
1048 | technical tehia
1049 | prominent pom
1050 | mistake mke mistakes
1051 | contract conr contracts
1052 | framework fk frameworks
1053 | operator opra operators
1054 | professor pof professors
1055 | thick tik
1056 | efficient efit
1057 | expansion exas expansions
1058 | fairly fay
1059 | innovation inva innovations
1060 | typical ticl
1061 | disorder diso disorders
1062 | doubt dou doubts
1063 | coverage cov coverages
1064 | infrastructure ifae infrastructures
1065 | afterwards afer
1066 | fight fgh fights fought fighting
1067 | apparently aety
1068 | attribute atrie attributes attributed attributing
1069 | imagine iagn imagines imagined imagining
1070 | sexual sx
1071 | brand bnd brands
1072 | transmission trasi transmissions
1073 | particle pace particles
1074 | maintenance maic maintenances
1075 | scientist senti scientists
1076 | domestic desc
1077 | reportedly roy
1078 | primarily pima
1079 | promise pmie promises promised promising
1080 | stable sbl
1081 | knife kie knives
1082 | instrument ium instruments
1083 | effectively ectv
1084 | regime rgm regimes
1085 | nomination noma nominations
1086 | extensive exts
1087 | criterion crio criteria
1088 | classification csio classifications
1089 | storage sage storages
1090 | command cand commands
1091 | highway hiwa highways
1092 | correlation ceati correlations
1093 | long-term lgt long-terms
1094 | limitation ltao limitations
1095 | beauty bty beauties
1096 | shoulder shde shoulders
1097 | creature crue creatures
1098 | sufficient suen
1099 | sustainability suy sustainabilities
1100 | diverse dive
1101 | victory vty victories
1102 |
--------------------------------------------------------------------------------
/abbrgen.py:
--------------------------------------------------------------------------------
1 | import csv
2 | import logging
3 | import os
4 | import sys
5 | import json
6 | import layout
7 | import utils
8 | from effort_calculator import EffortCalculator
9 | from pattern import en
10 |
11 | # hack to fix https://github.com/clips/pattern/issues/243
12 | try:
13 | en.conjugate("purred", "3sg")
14 | except RuntimeError:
15 | pass
16 |
17 | # stop after processing this many lines in words.tsv
18 | limit = 0
19 | # any word shorter than this will be excluded
20 | min_chars = 3
21 | # except some short words since they have enough alts to make it still worth using eg. {"i", "he", "do", "go"}
22 | short_exceptions = {}
23 | # any percent improvement below this will not be considered and the word might be excluded if there are no other options
24 | min_improvement = 40
25 | # the abbreviations will not end with any of these characters so you can use them as a suffix to access the alternate abbreviation forms or punctuation eg "qjzx;,.:?"
26 | banned_suffixes = ""
27 | # don't accept any abbreviation shorter than this, useful for example if you want to keep all the single character abbreviations free to manually assign to punctuation etc. you could set it to 2
28 | min_abbreviation_length = 1
29 | # output the words with no abbreviation found so you can add them by hand
30 | output_all = False
31 | # change this to your keyboard layout, ensure its listed in layout.py
32 | keyboard_layout = layout.engram
33 | # change this to the effort map for your keyboard shape: effort_map_standard, effort_map_matrix
34 | effort_map = layout.effort_map_matrix
35 | # chorded mode will ensure its possible to chord and remove sfb's and scissors completely
36 | chorded_mode = True
37 | # this is the effort penalty added to sequences with same finger bigrams (using the same finger for 2 keys in a row)
38 | sfb_penalty = 0.8
39 | # this is the effort penalty added to sequences with scissors (travelling between the top and bottom rows on the same hand)
40 | scissor_penalty = 0.5
41 |
42 | # internal variables
43 | log = logging.getLogger("abbrgen")
44 | log.addHandler(logging.StreamHandler(sys.stdout))
45 | log.setLevel(logging.DEBUG)
46 |
47 | calc = EffortCalculator(keyboard_layout, effort_map)
48 |
49 | used = {}
50 | seen = {}
51 | line_no = 0
52 |
53 |
54 | def find_abbr(word):
55 | word = word.lower()
56 | log.debug(f"=== {word} ===")
57 | short_exception = word in short_exceptions
58 | if len(word) < min_chars and not short_exception:
59 | log.debug(f"rejected: minimum chars less than {min_chars}")
60 | return None
61 | if word in seen:
62 | log.debug(f"rejected: already seen")
63 | return None
64 |
65 | seen[word] = True
66 | combinations = utils.find_combinations(word)
67 | combinations.sort(key=len)
68 | sfb_option = None
69 | options = []
70 |
71 | for abbr in combinations:
72 | log.debug(abbr)
73 | if len(abbr) < min_abbreviation_length:
74 | log.debug(
75 | f"rejected: abbreviation length less than {min_abbreviation_length}"
76 | )
77 | continue
78 | if not abbr in used:
79 | if len(abbr) > 1 and abbr[-1] in banned_suffixes:
80 | log.debug(f"rejected: '{abbr[-1]}' is a banned suffix")
81 | continue
82 | improvement = ((len(word) - len(abbr)) / len(word)) * 100
83 | if improvement >= min_improvement or short_exception:
84 | effort = calc.calculate(
85 | abbr, sfb_penalty, scissor_penalty, chorded_mode
86 | )
87 | if not effort:
88 | continue
89 | log.debug(f"effort: {effort}")
90 | options.append({"abbr": abbr, "effort": effort})
91 | else:
92 | log.debug(f"rejected: improvement insufficient ({improvement}%)")
93 | break
94 | else:
95 | log.debug("rejected: already used")
96 |
97 | if options:
98 | options.sort(key=lambda x: x["effort"])
99 | abbr = options[0]["abbr"]
100 | log.debug(f"selected: {abbr}")
101 | if chorded_mode:
102 | # need to mark every possible combination as used
103 | combinations = utils.find_all_combinations(abbr)
104 | for a in combinations:
105 | used[a] = word
106 | else:
107 | used[abbr] = word
108 | return abbr
109 |
110 | log.debug("dropped: no abbreviation found")
111 | return None
112 |
113 |
114 | with open("words.tsv") as file:
115 | file = csv.reader(file, delimiter="\t")
116 |
117 | alt_data = {}
118 | if os.path.isfile("alt.tsv"):
119 | log.debug("loading alt.tsv")
120 | with open("alt.tsv") as alt_file:
121 | alt_file = csv.reader(alt_file, delimiter="\t")
122 | for line in alt_file:
123 | if line:
124 | alt_data[line[0]] = line[1:]
125 |
126 | output = ""
127 | for line in file:
128 | line_no += 1
129 | if limit > 0 and line_no > limit:
130 | break
131 | word = line[0]
132 | if not word:
133 | break
134 | type = line[1]
135 | word = word.strip()
136 | if word[0] == "#":
137 | continue
138 | abbr = find_abbr(word)
139 |
140 | if output_all or abbr:
141 | abbr = abbr or ""
142 | alt = ["", "", ""]
143 | if word in alt_data:
144 | alt = alt_data[word]
145 | elif type == "VERB":
146 | alt[0] = en.conjugate(word, "3sg")
147 | alt[1] = en.conjugate(word, "1sgp")
148 | alt[2] = en.conjugate(word, "part")
149 | elif type == "NOUN":
150 | alt[0] = en.pluralize(word, pos=en.NOUN)
151 |
152 | for a in alt:
153 | if a:
154 | if a in seen:
155 | log.debug(f"Alt already seen '{a}'")
156 | else:
157 | seen[a] = True
158 |
159 | line = f"{word}\t{abbr}\t" + "\t".join(alt)
160 | log.info(line)
161 | output += line + "\n"
162 |
163 | with open("abbr.tsv", "w") as file:
164 | file.write(output)
165 |
--------------------------------------------------------------------------------
/alt.tsv:
--------------------------------------------------------------------------------
1 | my mine
2 | our ours
3 | your yours
4 | her hers
5 | their theirs
6 |
--------------------------------------------------------------------------------
/combos.dtsi:
--------------------------------------------------------------------------------
1 | #define COMBO(NAME, BINDINGS, KEYPOS) \
2 | combo_##NAME { \
3 | timeout-ms = <100>; \
4 | bindings = ; \
5 | key-positions = ; \
6 | layers = <0>; \
7 | };
8 |
9 | COMBO(c_SEMI, ¯o_c_SEMI, 27 33)
10 | COMBO(c_COMMA, ¯o_c_COMMA, 28 33)
11 | COMBO(c_DOT, ¯o_c_DOT, 29 33)
12 | COMBO(c_t, ¯o_c_t, 13 33)
13 | COMBO(s_c_t, ¯o_s_c_t, 13 32 33)
14 | COMBO(c_a, ¯o_c_a, 19 33)
15 | COMBO(s_c_a, ¯o_s_c_a, 19 32 33)
16 | COMBO(c_y, ¯o_c_y, 2 33)
17 | COMBO(s_c_y, ¯o_s_c_y, 2 32 33)
18 | COMBO(c_h, ¯o_c_h, 26 33)
19 | COMBO(s_c_h, ¯o_s_c_h, 26 32 33)
20 | COMBO(c_th, ¯o_c_th, 13 26 33)
21 | COMBO(s_c_th, ¯o_s_c_th, 13 26 32 33)
22 | COMBO(c_yr, ¯o_c_yr, 2 11 33)
23 | COMBO(s_c_yr, ¯o_s_c_yr, 2 11 32 33)
24 | COMBO(c_yr_, ¯o_c_yr_, 2 11 30 33)
25 | COMBO(s_c_yr_, ¯o_s_c_yr_, 2 11 30 32 33)
26 | COMBO(c_c, ¯o_c_c, 10 33)
27 | COMBO(s_c_c, ¯o_s_c_c, 10 32 33)
28 | COMBO(c_b, ¯o_c_b, 4 33)
29 | COMBO(s_c_b, ¯o_s_c_b, 4 32 33)
30 | COMBO(c_w, ¯o_c_w, 0 33)
31 | COMBO(s_c_w, ¯o_s_c_w, 0 32 33)
32 | COMBO(c_te, ¯o_c_te, 13 17 33)
33 | COMBO(s_c_te, ¯o_s_c_te, 13 17 32 33)
34 | COMBO(c_ti, ¯o_c_ti, 13 18 33)
35 | COMBO(s_c_ti, ¯o_s_c_ti, 13 18 32 33)
36 | COMBO(c_wh, ¯o_c_wh, 0 26 33)
37 | COMBO(s_c_wh, ¯o_s_c_wh, 0 26 32 33)
38 | COMBO(c_s, ¯o_c_s, 12 33)
39 | COMBO(s_c_s, ¯o_s_c_s, 12 32 33)
40 | COMBO(c_s_, ¯o_c_s_, 12 30 33)
41 | COMBO(s_c_s_, ¯o_s_c_s_, 12 30 32 33)
42 | COMBO(c_s__, ¯o_c_s__, 12 31 33)
43 | COMBO(s_c_s__, ¯o_s_c_s__, 12 31 32 33)
44 | COMBO(c_s___, ¯o_c_s___, 12 30 31 33)
45 | COMBO(s_c_s___, ¯o_s_c_s___, 12 30 31 32 33)
46 | COMBO(c_m, ¯o_c_m, 15 33)
47 | COMBO(s_c_m, ¯o_s_c_m, 15 32 33)
48 | COMBO(c_m_, ¯o_c_m_, 15 30 33)
49 | COMBO(s_c_m_, ¯o_s_c_m_, 15 30 32 33)
50 | COMBO(c_m__, ¯o_c_m__, 15 31 33)
51 | COMBO(s_c_m__, ¯o_s_c_m__, 15 31 32 33)
52 | COMBO(c_m___, ¯o_c_m___, 15 30 31 33)
53 | COMBO(s_c_m___, ¯o_s_c_m___, 15 30 31 32 33)
54 | COMBO(c_tr, ¯o_c_tr, 11 13 33)
55 | COMBO(s_c_tr, ¯o_s_c_tr, 11 13 32 33)
56 | COMBO(c_tr_, ¯o_c_tr_, 11 13 30 33)
57 | COMBO(s_c_tr_, ¯o_s_c_tr_, 11 13 30 32 33)
58 | COMBO(c_as, ¯o_c_as, 12 19 33)
59 | COMBO(s_c_as, ¯o_s_c_as, 12 19 32 33)
60 | COMBO(c_u, ¯o_c_u, 8 33)
61 | COMBO(s_c_u, ¯o_s_c_u, 8 32 33)
62 | COMBO(c_u_, ¯o_c_u_, 8 30 33)
63 | COMBO(s_c_u_, ¯o_s_c_u_, 8 30 32 33)
64 | COMBO(c_u__, ¯o_c_u__, 8 31 33)
65 | COMBO(s_c_u__, ¯o_s_c_u__, 8 31 32 33)
66 | COMBO(c_u___, ¯o_c_u___, 8 30 31 33)
67 | COMBO(s_c_u___, ¯o_s_c_u___, 8 30 31 32 33)
68 | COMBO(c_we, ¯o_c_we, 0 17 33)
69 | COMBO(s_c_we, ¯o_s_c_we, 0 17 32 33)
70 | COMBO(c_o, ¯o_c_o, 7 33)
71 | COMBO(s_c_o, ¯o_s_c_o, 7 32 33)
72 | COMBO(c_ta, ¯o_c_ta, 13 19 33)
73 | COMBO(s_c_ta, ¯o_s_c_ta, 13 19 32 33)
74 | COMBO(c_ta_, ¯o_c_ta_, 13 19 30 33)
75 | COMBO(s_c_ta_, ¯o_s_c_ta_, 13 19 30 32 33)
76 | COMBO(c_ta__, ¯o_c_ta__, 13 19 31 33)
77 | COMBO(s_c_ta__, ¯o_s_c_ta__, 13 19 31 32 33)
78 | COMBO(c_ta___, ¯o_c_ta___, 13 19 30 31 33)
79 | COMBO(s_c_ta___, ¯o_s_c_ta___, 13 19 30 31 32 33)
80 | COMBO(c_wo, ¯o_c_wo, 0 7 33)
81 | COMBO(s_c_wo, ¯o_s_c_wo, 0 7 32 33)
82 | COMBO(c_g, ¯o_c_g, 14 33)
83 | COMBO(s_c_g, ¯o_s_c_g, 14 32 33)
84 | COMBO(c_g_, ¯o_c_g_, 14 30 33)
85 | COMBO(s_c_g_, ¯o_s_c_g_, 14 30 32 33)
86 | COMBO(c_g__, ¯o_c_g__, 14 31 33)
87 | COMBO(s_c_g__, ¯o_s_c_g__, 14 31 32 33)
88 | COMBO(c_g___, ¯o_c_g___, 14 30 31 33)
89 | COMBO(s_c_g___, ¯o_s_c_g___, 14 30 31 32 33)
90 | COMBO(c_gd, ¯o_c_gd, 14 23 33)
91 | COMBO(s_c_gd, ¯o_s_c_gd, 14 23 32 33)
92 | COMBO(c_p, ¯o_c_p, 3 33)
93 | COMBO(s_c_p, ¯o_s_c_p, 3 32 33)
94 | COMBO(c_p_, ¯o_c_p_, 3 30 33)
95 | COMBO(s_c_p_, ¯o_s_c_p_, 3 30 32 33)
96 | COMBO(c_k, ¯o_c_k, 24 33)
97 | COMBO(s_c_k, ¯o_s_c_k, 24 32 33)
98 | COMBO(c_k_, ¯o_c_k_, 24 30 33)
99 | COMBO(s_c_k_, ¯o_s_c_k_, 24 30 32 33)
100 | COMBO(c_k__, ¯o_c_k__, 24 31 33)
101 | COMBO(s_c_k__, ¯o_s_c_k__, 24 31 32 33)
102 | COMBO(c_k___, ¯o_c_k___, 24 30 31 33)
103 | COMBO(s_c_k___, ¯o_s_c_k___, 24 30 31 32 33)
104 | COMBO(c_ya, ¯o_c_ya, 2 19 33)
105 | COMBO(s_c_ya, ¯o_s_c_ya, 2 19 32 33)
106 | COMBO(c_ya_, ¯o_c_ya_, 2 19 30 33)
107 | COMBO(s_c_ya_, ¯o_s_c_ya_, 2 19 30 32 33)
108 | COMBO(c_i, ¯o_c_i, 18 33)
109 | COMBO(s_c_i, ¯o_s_c_i, 18 32 33)
110 | COMBO(c_me, ¯o_c_me, 15 17 33)
111 | COMBO(s_c_me, ¯o_s_c_me, 15 17 32 33)
112 | COMBO(c_se, ¯o_c_se, 12 17 33)
113 | COMBO(s_c_se, ¯o_s_c_se, 12 17 32 33)
114 | COMBO(c_the, ¯o_c_the, 13 17 26 33)
115 | COMBO(s_c_the, ¯o_s_c_the, 13 17 26 32 33)
116 | COMBO(c_tn, ¯o_c_tn, 13 16 33)
117 | COMBO(s_c_tn, ¯o_s_c_tn, 13 16 32 33)
118 | COMBO(c_whe, ¯o_c_whe, 0 17 26 33)
119 | COMBO(s_c_whe, ¯o_s_c_whe, 0 17 26 32 33)
120 | COMBO(c_tk, ¯o_c_tk, 13 24 33)
121 | COMBO(s_c_tk, ¯o_s_c_tk, 13 24 32 33)
122 | COMBO(c_tk_, ¯o_c_tk_, 13 24 30 33)
123 | COMBO(s_c_tk_, ¯o_s_c_tk_, 13 24 30 32 33)
124 | COMBO(c_tk__, ¯o_c_tk__, 13 24 31 33)
125 | COMBO(s_c_tk__, ¯o_s_c_tk__, 13 24 31 32 33)
126 | COMBO(c_tk___, ¯o_c_tk___, 13 24 30 31 33)
127 | COMBO(s_c_tk___, ¯o_s_c_tk___, 13 24 30 31 32 33)
128 | COMBO(c_ce, ¯o_c_ce, 10 17 33)
129 | COMBO(s_c_ce, ¯o_s_c_ce, 10 17 32 33)
130 | COMBO(c_ce_, ¯o_c_ce_, 10 17 30 33)
131 | COMBO(s_c_ce_, ¯o_s_c_ce_, 10 17 30 32 33)
132 | COMBO(c_ce__, ¯o_c_ce__, 10 17 31 33)
133 | COMBO(s_c_ce__, ¯o_s_c_ce__, 10 17 31 32 33)
134 | COMBO(c_ce___, ¯o_c_ce___, 10 17 30 31 33)
135 | COMBO(s_c_ce___, ¯o_s_c_ce___, 10 17 30 31 32 33)
136 | COMBO(c_wa, ¯o_c_wa, 0 19 33)
137 | COMBO(s_c_wa, ¯o_s_c_wa, 0 19 32 33)
138 | COMBO(c_f, ¯o_c_f, 6 33)
139 | COMBO(s_c_f, ¯o_s_c_f, 6 32 33)
140 | COMBO(c_f_, ¯o_c_f_, 6 30 33)
141 | COMBO(s_c_f_, ¯o_s_c_f_, 6 30 32 33)
142 | COMBO(c_f__, ¯o_c_f__, 6 31 33)
143 | COMBO(s_c_f__, ¯o_s_c_f__, 6 31 32 33)
144 | COMBO(c_f___, ¯o_c_f___, 6 30 31 33)
145 | COMBO(s_c_f___, ¯o_s_c_f___, 6 30 31 32 33)
146 | COMBO(c_ts, ¯o_c_ts, 12 13 33)
147 | COMBO(s_c_ts, ¯o_s_c_ts, 12 13 32 33)
148 | COMBO(c_co, ¯o_c_co, 7 10 33)
149 | COMBO(s_c_co, ¯o_s_c_co, 7 10 32 33)
150 | COMBO(c_ft, ¯o_c_ft, 6 13 33)
151 | COMBO(s_c_ft, ¯o_s_c_ft, 6 13 32 33)
152 | COMBO(c_v, ¯o_c_v, 22 33)
153 | COMBO(s_c_v, ¯o_s_c_v, 22 32 33)
154 | COMBO(c_ie, ¯o_c_ie, 17 18 33)
155 | COMBO(s_c_ie, ¯o_s_c_ie, 17 18 32 33)
156 | COMBO(c_ie_, ¯o_c_ie_, 17 18 30 33)
157 | COMBO(s_c_ie_, ¯o_s_c_ie_, 17 18 30 32 33)
158 | COMBO(c_ie__, ¯o_c_ie__, 17 18 31 33)
159 | COMBO(s_c_ie__, ¯o_s_c_ie__, 17 18 31 32 33)
160 | COMBO(c_ie___, ¯o_c_ie___, 17 18 30 31 33)
161 | COMBO(s_c_ie___, ¯o_s_c_ie___, 17 18 30 31 32 33)
162 | COMBO(c_on, ¯o_c_on, 7 16 33)
163 | COMBO(s_c_on, ¯o_s_c_on, 7 16 32 33)
164 | COMBO(c_d, ¯o_c_d, 23 33)
165 | COMBO(s_c_d, ¯o_s_c_d, 23 32 33)
166 | COMBO(c_d_, ¯o_c_d_, 23 30 33)
167 | COMBO(s_c_d_, ¯o_s_c_d_, 23 30 32 33)
168 | COMBO(c_j, ¯o_c_j, 21 33)
169 | COMBO(s_c_j, ¯o_s_c_j, 21 32 33)
170 | COMBO(c_ge, ¯o_c_ge, 14 17 33)
171 | COMBO(s_c_ge, ¯o_s_c_ge, 14 17 32 33)
172 | COMBO(c_ge_, ¯o_c_ge_, 14 17 30 33)
173 | COMBO(s_c_ge_, ¯o_s_c_ge_, 14 17 30 32 33)
174 | COMBO(c_ge__, ¯o_c_ge__, 14 17 31 33)
175 | COMBO(s_c_ge__, ¯o_s_c_ge__, 14 17 31 32 33)
176 | COMBO(c_ge___, ¯o_c_ge___, 14 17 30 31 33)
177 | COMBO(s_c_ge___, ¯o_s_c_ge___, 14 17 30 31 32 33)
178 | COMBO(c_sh, ¯o_c_sh, 12 26 33)
179 | COMBO(s_c_sh, ¯o_s_c_sh, 12 26 32 33)
180 | COMBO(c_ma, ¯o_c_ma, 15 19 33)
181 | COMBO(s_c_ma, ¯o_s_c_ma, 15 19 32 33)
182 | COMBO(c_so, ¯o_c_so, 7 12 33)
183 | COMBO(s_c_so, ¯o_s_c_so, 7 12 32 33)
184 | COMBO(c_wl, ¯o_c_wl, 0 1 33)
185 | COMBO(s_c_wl, ¯o_s_c_wl, 0 1 32 33)
186 | COMBO(c_ae, ¯o_c_ae, 17 19 33)
187 | COMBO(s_c_ae, ¯o_s_c_ae, 17 19 32 33)
188 | COMBO(c_ae_, ¯o_c_ae_, 17 19 30 33)
189 | COMBO(s_c_ae_, ¯o_s_c_ae_, 17 19 30 32 33)
190 | COMBO(c_n, ¯o_c_n, 16 33)
191 | COMBO(s_c_n, ¯o_s_c_n, 16 32 33)
192 | COMBO(c_n_, ¯o_c_n_, 16 30 33)
193 | COMBO(s_c_n_, ¯o_s_c_n_, 16 30 32 33)
194 | COMBO(c_n__, ¯o_c_n__, 16 31 33)
195 | COMBO(s_c_n__, ¯o_s_c_n__, 16 31 32 33)
196 | COMBO(c_n___, ¯o_c_n___, 16 30 31 33)
197 | COMBO(s_c_n___, ¯o_s_c_n___, 16 30 31 32 33)
198 | COMBO(c_ms, ¯o_c_ms, 12 15 33)
199 | COMBO(s_c_ms, ¯o_s_c_ms, 12 15 32 33)
200 | COMBO(c_ct, ¯o_c_ct, 10 13 33)
201 | COMBO(s_c_ct, ¯o_s_c_ct, 10 13 32 33)
202 | COMBO(c_ct_, ¯o_c_ct_, 10 13 30 33)
203 | COMBO(s_c_ct_, ¯o_s_c_ct_, 10 13 30 32 33)
204 | COMBO(c_ia, ¯o_c_ia, 18 19 33)
205 | COMBO(s_c_ia, ¯o_s_c_ia, 18 19 32 33)
206 | COMBO(c_ia_, ¯o_c_ia_, 18 19 30 33)
207 | COMBO(s_c_ia_, ¯o_s_c_ia_, 18 19 30 32 33)
208 | COMBO(c_l, ¯o_c_l, 1 33)
209 | COMBO(s_c_l, ¯o_s_c_l, 1 32 33)
210 | COMBO(c_l_, ¯o_c_l_, 1 30 33)
211 | COMBO(s_c_l_, ¯o_s_c_l_, 1 30 32 33)
212 | COMBO(c_l__, ¯o_c_l__, 1 31 33)
213 | COMBO(s_c_l__, ¯o_s_c_l__, 1 31 32 33)
214 | COMBO(c_l___, ¯o_c_l___, 1 30 31 33)
215 | COMBO(s_c_l___, ¯o_s_c_l___, 1 30 31 32 33)
216 | COMBO(c_hi, ¯o_c_hi, 18 26 33)
217 | COMBO(s_c_hi, ¯o_s_c_hi, 18 26 32 33)
218 | COMBO(c_le, ¯o_c_le, 1 17 33)
219 | COMBO(s_c_le, ¯o_s_c_le, 1 17 32 33)
220 | COMBO(c_le_, ¯o_c_le_, 1 17 30 33)
221 | COMBO(s_c_le_, ¯o_s_c_le_, 1 17 30 32 33)
222 | COMBO(c_wi, ¯o_c_wi, 0 18 33)
223 | COMBO(s_c_wi, ¯o_s_c_wi, 0 18 32 33)
224 | COMBO(c_ba, ¯o_c_ba, 4 19 33)
225 | COMBO(s_c_ba, ¯o_s_c_ba, 4 19 32 33)
226 | COMBO(c_thi, ¯o_c_thi, 13 18 26 33)
227 | COMBO(s_c_thi, ¯o_s_c_thi, 13 18 26 32 33)
228 | COMBO(c_thi_, ¯o_c_thi_, 13 18 26 30 33)
229 | COMBO(s_c_thi_, ¯o_s_c_thi_, 13 18 26 30 32 33)
230 | COMBO(c_bo, ¯o_c_bo, 4 7 33)
231 | COMBO(s_c_bo, ¯o_s_c_bo, 4 7 32 33)
232 | COMBO(c_bo_, ¯o_c_bo_, 4 7 30 33)
233 | COMBO(s_c_bo_, ¯o_s_c_bo_, 4 7 30 32 33)
234 | COMBO(c_bo__, ¯o_c_bo__, 4 7 31 33)
235 | COMBO(s_c_bo__, ¯o_s_c_bo__, 4 7 31 32 33)
236 | COMBO(c_bo___, ¯o_c_bo___, 4 7 30 31 33)
237 | COMBO(s_c_bo___, ¯o_s_c_bo___, 4 7 30 31 32 33)
238 | COMBO(c_he, ¯o_c_he, 17 26 33)
239 | COMBO(s_c_he, ¯o_s_c_he, 17 26 32 33)
240 | COMBO(c_pa, ¯o_c_pa, 3 19 33)
241 | COMBO(s_c_pa, ¯o_s_c_pa, 3 19 32 33)
242 | COMBO(c_pa_, ¯o_c_pa_, 3 19 30 33)
243 | COMBO(s_c_pa_, ¯o_s_c_pa_, 3 19 30 32 33)
244 | COMBO(c_ga, ¯o_c_ga, 14 19 33)
245 | COMBO(s_c_ga, ¯o_s_c_ga, 14 19 32 33)
246 | COMBO(c_wk, ¯o_c_wk, 0 24 33)
247 | COMBO(s_c_wk, ¯o_s_c_wk, 0 24 32 33)
248 | COMBO(c_wk_, ¯o_c_wk_, 0 24 30 33)
249 | COMBO(s_c_wk_, ¯o_s_c_wk_, 0 24 30 32 33)
250 | COMBO(c_wk__, ¯o_c_wk__, 0 24 31 33)
251 | COMBO(s_c_wk__, ¯o_s_c_wk__, 0 24 31 32 33)
252 | COMBO(c_wk___, ¯o_c_wk___, 0 24 30 31 33)
253 | COMBO(s_c_wk___, ¯o_s_c_wk___, 0 24 30 31 32 33)
254 | COMBO(c_la, ¯o_c_la, 1 19 33)
255 | COMBO(s_c_la, ¯o_s_c_la, 1 19 32 33)
256 | COMBO(c_sl, ¯o_c_sl, 1 12 33)
257 | COMBO(s_c_sl, ¯o_s_c_sl, 1 12 32 33)
258 | COMBO(c_cn, ¯o_c_cn, 10 16 33)
259 | COMBO(s_c_cn, ¯o_s_c_cn, 10 16 32 33)
260 | COMBO(c_cn_, ¯o_c_cn_, 10 16 30 33)
261 | COMBO(s_c_cn_, ¯o_s_c_cn_, 10 16 30 32 33)
262 | COMBO(c_e, ¯o_c_e, 17 33)
263 | COMBO(s_c_e, ¯o_s_c_e, 17 32 33)
264 | COMBO(c_sd, ¯o_c_sd, 12 23 33)
265 | COMBO(s_c_sd, ¯o_s_c_sd, 12 23 32 33)
266 | COMBO(c_sd_, ¯o_c_sd_, 12 23 30 33)
267 | COMBO(s_c_sd_, ¯o_s_c_sd_, 12 23 30 32 33)
268 | COMBO(c_fo, ¯o_c_fo, 6 7 33)
269 | COMBO(s_c_fo, ¯o_s_c_fo, 6 7 32 33)
270 | COMBO(c_fo_, ¯o_c_fo_, 6 7 30 33)
271 | COMBO(s_c_fo_, ¯o_s_c_fo_, 6 7 30 32 33)
272 | COMBO(c_fo__, ¯o_c_fo__, 6 7 31 33)
273 | COMBO(s_c_fo__, ¯o_s_c_fo__, 6 7 31 32 33)
274 | COMBO(c_fo___, ¯o_c_fo___, 6 7 30 31 33)
275 | COMBO(s_c_fo___, ¯o_s_c_fo___, 6 7 30 31 32 33)
276 | COMBO(c_ste, ¯o_c_ste, 12 13 17 33)
277 | COMBO(s_c_ste, ¯o_s_c_ste, 12 13 17 32 33)
278 | COMBO(c_ste_, ¯o_c_ste_, 12 13 17 30 33)
279 | COMBO(s_c_ste_, ¯o_s_c_ste_, 12 13 17 30 32 33)
280 | COMBO(c_de, ¯o_c_de, 17 23 33)
281 | COMBO(s_c_de, ¯o_s_c_de, 17 23 32 33)
282 | COMBO(c_lea, ¯o_c_lea, 1 17 19 33)
283 | COMBO(s_c_lea, ¯o_s_c_lea, 1 17 19 32 33)
284 | COMBO(c_lea_, ¯o_c_lea_, 1 17 19 30 33)
285 | COMBO(s_c_lea_, ¯o_s_c_lea_, 1 17 19 30 32 33)
286 | COMBO(c_lea__, ¯o_c_lea__, 1 17 19 31 33)
287 | COMBO(s_c_lea__, ¯o_s_c_lea__, 1 17 19 31 32 33)
288 | COMBO(c_lea___, ¯o_c_lea___, 1 17 19 30 31 33)
289 | COMBO(s_c_lea___, ¯o_s_c_lea___, 1 17 19 30 31 32 33)
290 | COMBO(c_pe, ¯o_c_pe, 3 17 33)
291 | COMBO(s_c_pe, ¯o_s_c_pe, 3 17 32 33)
292 | COMBO(c_pe_, ¯o_c_pe_, 3 17 30 33)
293 | COMBO(s_c_pe_, ¯o_s_c_pe_, 3 17 30 32 33)
294 | COMBO(c_hp, ¯o_c_hp, 3 26 33)
295 | COMBO(s_c_hp, ¯o_s_c_hp, 3 26 32 33)
296 | COMBO(c_hp_, ¯o_c_hp_, 3 26 30 33)
297 | COMBO(s_c_hp_, ¯o_s_c_hp_, 3 26 30 32 33)
298 | COMBO(c_hp__, ¯o_c_hp__, 3 26 31 33)
299 | COMBO(s_c_hp__, ¯o_s_c_hp__, 3 26 31 32 33)
300 | COMBO(c_hp___, ¯o_c_hp___, 3 26 30 31 33)
301 | COMBO(s_c_hp___, ¯o_s_c_hp___, 3 26 30 31 32 33)
302 | COMBO(c_r, ¯o_c_r, 11 33)
303 | COMBO(s_c_r, ¯o_s_c_r, 11 32 33)
304 | COMBO(c_r_, ¯o_c_r_, 11 30 33)
305 | COMBO(s_c_r_, ¯o_s_c_r_, 11 30 32 33)
306 | COMBO(c_r__, ¯o_c_r__, 11 31 33)
307 | COMBO(s_c_r__, ¯o_s_c_r__, 11 31 32 33)
308 | COMBO(c_r___, ¯o_c_r___, 11 30 31 33)
309 | COMBO(s_c_r___, ¯o_s_c_r___, 11 30 31 32 33)
310 | COMBO(c_ch, ¯o_c_ch, 10 26 33)
311 | COMBO(s_c_ch, ¯o_s_c_ch, 10 26 32 33)
312 | COMBO(c_ch_, ¯o_c_ch_, 10 26 30 33)
313 | COMBO(s_c_ch_, ¯o_s_c_ch_, 10 26 30 32 33)
314 | COMBO(c_ne, ¯o_c_ne, 16 17 33)
315 | COMBO(s_c_ne, ¯o_s_c_ne, 16 17 32 33)
316 | COMBO(c_ne_, ¯o_c_ne_, 16 17 30 33)
317 | COMBO(s_c_ne_, ¯o_s_c_ne_, 16 17 30 32 33)
318 | COMBO(c_mh, ¯o_c_mh, 15 26 33)
319 | COMBO(s_c_mh, ¯o_s_c_mh, 15 26 32 33)
320 | COMBO(c_ca, ¯o_c_ca, 10 19 33)
321 | COMBO(s_c_ca, ¯o_s_c_ca, 10 19 32 33)
322 | COMBO(c_ca_, ¯o_c_ca_, 10 19 30 33)
323 | COMBO(s_c_ca_, ¯o_s_c_ca_, 10 19 30 32 33)
324 | COMBO(c_ca__, ¯o_c_ca__, 10 19 31 33)
325 | COMBO(s_c_ca__, ¯o_s_c_ca__, 10 19 31 32 33)
326 | COMBO(c_ca___, ¯o_c_ca___, 10 19 30 31 33)
327 | COMBO(s_c_ca___, ¯o_s_c_ca___, 10 19 30 31 32 33)
328 | COMBO(c_tl, ¯o_c_tl, 1 13 33)
329 | COMBO(s_c_tl, ¯o_s_c_tl, 1 13 32 33)
330 | COMBO(c_tl_, ¯o_c_tl_, 1 13 30 33)
331 | COMBO(s_c_tl_, ¯o_s_c_tl_, 1 13 30 32 33)
332 | COMBO(c_tl__, ¯o_c_tl__, 1 13 31 33)
333 | COMBO(s_c_tl__, ¯o_s_c_tl__, 1 13 31 32 33)
334 | COMBO(c_tl___, ¯o_c_tl___, 1 13 30 31 33)
335 | COMBO(s_c_tl___, ¯o_s_c_tl___, 1 13 30 31 32 33)
336 | COMBO(c_wae, ¯o_c_wae, 0 17 19 33)
337 | COMBO(s_c_wae, ¯o_s_c_wae, 0 17 19 32 33)
338 | COMBO(c_wae_, ¯o_c_wae_, 0 17 19 30 33)
339 | COMBO(s_c_wae_, ¯o_s_c_wae_, 0 17 19 30 32 33)
340 | COMBO(c_si, ¯o_c_si, 12 18 33)
341 | COMBO(s_c_si, ¯o_s_c_si, 12 18 32 33)
342 | COMBO(c_si_, ¯o_c_si_, 12 18 30 33)
343 | COMBO(s_c_si_, ¯o_s_c_si_, 12 18 30 32 33)
344 | COMBO(c_to, ¯o_c_to, 7 13 33)
345 | COMBO(s_c_to, ¯o_s_c_to, 7 13 32 33)
346 | COMBO(c_to_, ¯o_c_to_, 7 13 30 33)
347 | COMBO(s_c_to_, ¯o_s_c_to_, 7 13 30 32 33)
348 | COMBO(c_gt, ¯o_c_gt, 13 14 33)
349 | COMBO(s_c_gt, ¯o_s_c_gt, 13 14 32 33)
350 | COMBO(c_gt_, ¯o_c_gt_, 13 14 30 33)
351 | COMBO(s_c_gt_, ¯o_s_c_gt_, 13 14 30 32 33)
352 | COMBO(c_ke, ¯o_c_ke, 17 24 33)
353 | COMBO(s_c_ke, ¯o_s_c_ke, 17 24 32 33)
354 | COMBO(c_ke_, ¯o_c_ke_, 17 24 30 33)
355 | COMBO(s_c_ke_, ¯o_s_c_ke_, 17 24 30 32 33)
356 | COMBO(c_ke__, ¯o_c_ke__, 17 24 31 33)
357 | COMBO(s_c_ke__, ¯o_s_c_ke__, 17 24 31 32 33)
358 | COMBO(c_ke___, ¯o_c_ke___, 17 24 30 31 33)
359 | COMBO(s_c_ke___, ¯o_s_c_ke___, 17 24 30 31 32 33)
360 | COMBO(c_fa, ¯o_c_fa, 6 19 33)
361 | COMBO(s_c_fa, ¯o_s_c_fa, 6 19 32 33)
362 | COMBO(c_fa_, ¯o_c_fa_, 6 19 30 33)
363 | COMBO(s_c_fa_, ¯o_s_c_fa_, 6 19 30 32 33)
364 | COMBO(c_sti, ¯o_c_sti, 12 13 18 33)
365 | COMBO(s_c_sti, ¯o_s_c_sti, 12 13 18 32 33)
366 | COMBO(c_sr, ¯o_c_sr, 11 12 33)
367 | COMBO(s_c_sr, ¯o_s_c_sr, 11 12 32 33)
368 | COMBO(c_fe, ¯o_c_fe, 6 17 33)
369 | COMBO(s_c_fe, ¯o_s_c_fe, 6 17 32 33)
370 | COMBO(c_fe_, ¯o_c_fe_, 6 17 30 33)
371 | COMBO(s_c_fe_, ¯o_s_c_fe_, 6 17 30 32 33)
372 | COMBO(c_fe__, ¯o_c_fe__, 6 17 31 33)
373 | COMBO(s_c_fe__, ¯o_s_c_fe__, 6 17 31 32 33)
374 | COMBO(c_fe___, ¯o_c_fe___, 6 17 30 31 33)
375 | COMBO(s_c_fe___, ¯o_s_c_fe___, 6 17 30 31 32 33)
376 | COMBO(c_sat, ¯o_c_sat, 12 13 19 33)
377 | COMBO(s_c_sat, ¯o_s_c_sat, 12 13 19 32 33)
378 | COMBO(c_sat_, ¯o_c_sat_, 12 13 19 30 33)
379 | COMBO(s_c_sat_, ¯o_s_c_sat_, 12 13 19 30 32 33)
380 | COMBO(c_sat__, ¯o_c_sat__, 12 13 19 31 33)
381 | COMBO(s_c_sat__, ¯o_s_c_sat__, 12 13 19 31 32 33)
382 | COMBO(c_sat___, ¯o_c_sat___, 12 13 19 30 31 33)
383 | COMBO(s_c_sat___, ¯o_s_c_sat___, 12 13 19 30 31 32 33)
384 | COMBO(c_cs, ¯o_c_cs, 10 12 33)
385 | COMBO(s_c_cs, ¯o_s_c_cs, 10 12 32 33)
386 | COMBO(c_cs_, ¯o_c_cs_, 10 12 30 33)
387 | COMBO(s_c_cs_, ¯o_s_c_cs_, 10 12 30 32 33)
388 | COMBO(c_cs__, ¯o_c_cs__, 10 12 31 33)
389 | COMBO(s_c_cs__, ¯o_s_c_cs__, 10 12 31 32 33)
390 | COMBO(c_cs___, ¯o_c_cs___, 10 12 30 31 33)
391 | COMBO(s_c_cs___, ¯o_s_c_cs___, 10 12 30 31 32 33)
392 | COMBO(c_na, ¯o_c_na, 16 19 33)
393 | COMBO(s_c_na, ¯o_s_c_na, 16 19 32 33)
394 | COMBO(c_na_, ¯o_c_na_, 16 19 30 33)
395 | COMBO(s_c_na_, ¯o_s_c_na_, 16 19 30 32 33)
396 | COMBO(c_ir, ¯o_c_ir, 11 18 33)
397 | COMBO(s_c_ir, ¯o_s_c_ir, 11 18 32 33)
398 | COMBO(c_pi, ¯o_c_pi, 3 18 33)
399 | COMBO(s_c_pi, ¯o_s_c_pi, 3 18 32 33)
400 | COMBO(c_pi_, ¯o_c_pi_, 3 18 30 33)
401 | COMBO(s_c_pi_, ¯o_s_c_pi_, 3 18 30 32 33)
402 | COMBO(c_pi__, ¯o_c_pi__, 3 18 31 33)
403 | COMBO(s_c_pi__, ¯o_s_c_pi__, 3 18 31 32 33)
404 | COMBO(c_pi___, ¯o_c_pi___, 3 18 30 31 33)
405 | COMBO(s_c_pi___, ¯o_s_c_pi___, 3 18 30 31 32 33)
406 | COMBO(c_sp, ¯o_c_sp, 3 12 33)
407 | COMBO(s_c_sp, ¯o_s_c_sp, 3 12 32 33)
408 | COMBO(c_sp_, ¯o_c_sp_, 3 12 30 33)
409 | COMBO(s_c_sp_, ¯o_s_c_sp_, 3 12 30 32 33)
410 | COMBO(c_wd, ¯o_c_wd, 0 23 33)
411 | COMBO(s_c_wd, ¯o_s_c_wd, 0 23 32 33)
412 | COMBO(c_wd_, ¯o_c_wd_, 0 23 30 33)
413 | COMBO(s_c_wd_, ¯o_s_c_wd_, 0 23 30 32 33)
414 | COMBO(c_lc, ¯o_c_lc, 1 10 33)
415 | COMBO(s_c_lc, ¯o_s_c_lc, 1 10 32 33)
416 | COMBO(c_ld, ¯o_c_ld, 1 23 33)
417 | COMBO(s_c_ld, ¯o_s_c_ld, 1 23 32 33)
418 | COMBO(c_ld_, ¯o_c_ld_, 1 23 30 33)
419 | COMBO(s_c_ld_, ¯o_s_c_ld_, 1 23 30 32 33)
420 | COMBO(c_ld__, ¯o_c_ld__, 1 23 31 33)
421 | COMBO(s_c_ld__, ¯o_s_c_ld__, 1 23 31 32 33)
422 | COMBO(c_ld___, ¯o_c_ld___, 1 23 30 31 33)
423 | COMBO(s_c_ld___, ¯o_s_c_ld___, 1 23 30 31 32 33)
424 |
--------------------------------------------------------------------------------
/effort_calculator.py:
--------------------------------------------------------------------------------
1 | import logging
2 | import utils
3 | import json
4 |
5 | log = logging.getLogger("abbrgen")
6 |
7 | finger_maping = [
8 | [1, 2, 3, 4, 4, 5, 5, 6, 7, 8],
9 | [1, 2, 3, 4, 4, 5, 5, 6, 7, 8],
10 | [1, 2, 3, 4, 4, 5, 5, 6, 7, 8],
11 | ]
12 |
13 | hand_row_maping = [
14 | ["tl", "tl", "tl", "tl", "tl", "tr", "tr", "tr", "tr", "tr"],
15 | ["ml", "ml", "ml", "ml", "ml", "mr", "mr", "mr", "mr", "mr"],
16 | ["bl", "bl", "bl", "bl", "bl", "br", "br", "br", "br", "br"],
17 | ]
18 |
19 | # you can ban chords that you find uncomfortable, this left hand side is mirrored
20 | banned_chords = [
21 | [
22 | [0, 0, 0, 0, 0],
23 | [0, 0, 0, 0, 1],
24 | [0, 0, 1, 0, 0],
25 | ],
26 | [
27 | [1, 0, 0, 0, 0],
28 | [0, 1, 0, 0, 0],
29 | [0, 0, 0, 0, 0],
30 | ],
31 | [
32 | [1, 0, 0, 0, 0],
33 | [0, 0, 1, 0, 0],
34 | [0, 0, 0, 0, 0],
35 | ],
36 | ]
37 |
38 |
39 | class EffortCalculator:
40 | def __init__(self, layout, effort_map):
41 | self.layout = layout
42 | self.effort_map = effort_map
43 | self.layout_map = {}
44 | self.effort_map = {}
45 | self.hand_row_map = {}
46 | for r in range(0, len(layout)):
47 | for c in range(0, len(layout[r])):
48 | self.layout_map[layout[r][c]] = finger_maping[r][c]
49 | self.effort_map[layout[r][c]] = effort_map[r][c]
50 | self.hand_row_map[layout[r][c]] = hand_row_maping[r][c]
51 | self.banned_chords_sets = []
52 |
53 | # Add mirrored chords and padding
54 | mirrored = []
55 | global banned_chords
56 | padding = [0, 0, 0, 0, 0]
57 | for ban in banned_chords:
58 | mirror = []
59 | for r in range(0, len(ban)):
60 | mirror.append(padding + list(reversed(ban[r])))
61 | ban[r] += padding
62 | mirrored.append(mirror)
63 | banned_chords += mirrored
64 |
65 | for ban in banned_chords:
66 | s = set()
67 | for r in range(0, len(ban)):
68 | for c in range(0, len(ban[r])):
69 | if ban[r][c]:
70 | s.add(layout[r][c])
71 | self.banned_chords_sets.append(s)
72 |
73 | def get_scissor_count(self, abbr):
74 | result = 0
75 | indexes = {
76 | "tl": 0,
77 | "ml": 0,
78 | "bl": 0,
79 | "tr": 0,
80 | "mr": 0,
81 | "br": 0,
82 | }
83 | for i in range(0, len(abbr)):
84 | indexes[self.hand_row_map[abbr[i]]] += 1
85 |
86 | if indexes["tl"] and indexes["bl"]:
87 | result += min(indexes["tl"], indexes["bl"])
88 |
89 | if indexes["tr"] and indexes["br"]:
90 | result += min(indexes["tr"], indexes["br"])
91 |
92 | return result
93 |
94 | def get_sfb_count(self, abbr):
95 | result = 0
96 | indexes = {}
97 | for i in range(0, len(abbr)):
98 | index = self.layout_map[abbr[i]]
99 | if not index in indexes:
100 | indexes[index] = 1
101 | else:
102 | indexes[index] += 1
103 | for x in indexes.values():
104 | if x > 1:
105 | result += x - 1
106 |
107 | return result
108 |
109 | def calculate(self, abbr, sfb_penalty, scissor_penalty, chorded_mode):
110 | for i in range(0, len(abbr)):
111 | if abbr[i] not in self.layout_map:
112 | log.debug(f"rejected: letter '{abbr[i]}' not in keyboard layout")
113 | return
114 |
115 | scissor_count = self.get_scissor_count(abbr)
116 | sfb_count = self.get_sfb_count(abbr)
117 | if chorded_mode:
118 | seen = set()
119 | for char in abbr:
120 | if char in seen:
121 | log.debug(
122 | "rejected: duplicate letters not accepted in chorded mode"
123 | )
124 | return
125 | seen.add(char)
126 |
127 | for ban in self.banned_chords_sets:
128 | if ban.issubset(seen):
129 | log.debug("rejected: banned chord")
130 | return
131 |
132 | if scissor_count:
133 | log.debug("rejected: scissors not accepted in chorded mode")
134 | return
135 |
136 | if sfb_count:
137 | log.debug("rejected: SFBs not accepted in chorded mode")
138 | return
139 |
140 | result = 0
141 | for i in range(0, len(abbr)):
142 | result += self.effort_map[abbr[i]]
143 |
144 | if not chorded_mode:
145 | if scissor_count:
146 | log.debug("Applying scissor penalty")
147 | result += scissor_count * scissor_penalty
148 | if sfb_count:
149 | log.debug("Applying SFB penalty")
150 | result += sfb_count * sfb_penalty
151 |
152 | return result
153 |
--------------------------------------------------------------------------------
/engram-chorded.kbd:
--------------------------------------------------------------------------------
1 | ;; Dlip's 28 Key Engram Layout
2 | ;; Adapted from the QMK version https://github.com/dlip/qmk_firmware/blob/dlip/keyboards/tamatama/keymaps/engram/README.md
3 |
4 | (defcfg
5 | linux-dev /dev/input/by-path/platform-i8042-serio-0-event-kbd
6 | concurrent-tap-hold yes
7 | )
8 |
9 | (include abbr.kbd)
10 |
11 | (defvar
12 | tap-timeout 0
13 | hold-timeout 180
14 | )
15 |
16 | (defsrc
17 | esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
18 | grv 1 2 3 4 5 6 7 8 9 0 - = bspc
19 | tab q w e r t y u i o p [ ] \
20 | caps a s d f g h j k l ; ' ret
21 | lsft z x c v b n m , . / rsft
22 | lctl lmet lalt muhenkan spc henkan ralt prtsc katakanahiragana rctl cmp
23 | )
24 |
25 |
26 | (defalias
27 | rpt rpt-any
28 | bse (layer-switch base)
29 | num (layer-toggle num)
30 | nav (layer-toggle nav)
31 | fun (layer-toggle fun)
32 | gam (layer-switch gaming)
33 | dis (layer-switch disable)
34 |
35 | c (tap-hold $tap-timeout $hold-timeout c lsft)
36 | i (tap-hold $tap-timeout $hold-timeout i lalt)
37 | e (tap-hold $tap-timeout $hold-timeout e lmet)
38 | a (tap-hold $tap-timeout $hold-timeout a lctl)
39 |
40 | h (tap-hold $tap-timeout $hold-timeout h rctl)
41 | t (tap-hold $tap-timeout $hold-timeout t rmet)
42 | s (tap-hold $tap-timeout $hold-timeout s lalt)
43 | n (tap-hold $tap-timeout $hold-timeout n lsft)
44 |
45 |
46 | q (tap-hold $tap-timeout $hold-timeout q lsft)
47 | ' (tap-hold $tap-timeout $hold-timeout ' lalt)
48 | , (tap-hold $tap-timeout $hold-timeout , lmet)
49 | . (tap-hold $tap-timeout $hold-timeout . lalt)
50 |
51 | 4 (tap-hold $tap-timeout $hold-timeout 4 rctl)
52 | 5 (tap-hold $tap-timeout $hold-timeout 5 rmet)
53 | 6 (tap-hold $tap-timeout $hold-timeout 6 lalt)
54 | 0 (tap-hold $tap-timeout $hold-timeout 0 rsft)
55 |
56 |
57 | all (tap-hold $tap-timeout $hold-timeout C-a lsft)
58 | del (tap-hold $tap-timeout $hold-timeout del lalt)
59 | esc (tap-hold $tap-timeout $hold-timeout esc lmet)
60 | ret (tap-hold $tap-timeout $hold-timeout ret lctl)
61 |
62 | lft (tap-hold $tap-timeout $hold-timeout left lctl)
63 | dwn (tap-hold $tap-timeout $hold-timeout down lmet)
64 | rgt (tap-hold $tap-timeout $hold-timeout rght lalt)
65 |
66 | udo C-z
67 | cut C-x
68 | cpy C-c
69 | pst C-v
70 |
71 | mut (tap-hold $tap-timeout $hold-timeout mute lsft)
72 | prv (tap-hold $tap-timeout $hold-timeout prev lalt)
73 | pp (tap-hold $tap-timeout $hold-timeout pp lmet)
74 | nxt (tap-hold $tap-timeout $hold-timeout next lctl)
75 |
76 | f4 (tap-hold $tap-timeout $hold-timeout f4 rctl)
77 | f5 (tap-hold $tap-timeout $hold-timeout f5 rmet)
78 | f6 (tap-hold $tap-timeout $hold-timeout f6 lalt)
79 | f10 (tap-hold $tap-timeout $hold-timeout f10 rsft)
80 |
81 | alt1 (tap-hold-press $tap-timeout $hold-timeout tab (layer-toggle num))
82 | alt2 (tap-hold $tap-timeout $hold-timeout spc (layer-toggle nav))
83 | sft (tap-hold-press $tap-timeout $hold-timeout bspc lsft)
84 | cbo C-bspc
85 | )
86 |
87 | (deflayer base
88 | _ _ _ _ _ _ _ _ _ _ _ _ _
89 | _ _ _ _ _ _ _ _ _ _ _ _ _ @dis
90 | b y o u XX XX XX XX l d w v _ _
91 | @c @i @e @a XX XX XX XX @h @t @s @n _
92 | g x j k XX XX XX XX r m f p
93 | _ lrld @alt1 @alt1 @alt2 @sft @sft @cbo @cbo @rpt bspc
94 | )
95 |
96 | (deflayer num
97 | _ _ _ _ _ _ _ _ _ _ _ _ _
98 | _ _ _ _ _ _ _ _ _ _ _ _ _ _
99 | ` ; - = _ _ _ _ 7 8 9 \ _ _
100 | @q @' @, @. _ _ _ _ @4 @5 @6 @0 _
101 | z spc [ ] _ _ _ _ 1 2 3 /
102 | _ _ _ _ @fun _ _ _ _ _ _
103 | )
104 |
105 | (deflayer nav
106 | _ _ _ _ _ _ _ _ _ _ _ _ _
107 | _ _ _ _ _ _ _ _ _ _ _ _ _ _
108 | @udo @cut @cpy @pst _ _ _ _ home up end XX _ _
109 | @all @del @esc @ret _ _ _ _ @lft @dwn @rgt rsft _
110 | _ _ _ prnt _ _ _ _ pgdn pgup XX XX
111 | _ _ @fun @fun - _ _ _ _ _ _
112 | )
113 |
114 | (deflayer fun
115 | _ _ _ _ _ _ _ _ _ _ _ _ _
116 | _ _ _ _ _ _ _ _ _ _ _ _ _ _
117 | XX XX vold volu XX XX XX XX f7 f8 f9 f11 _ _
118 | @mut @prv @pp @nxt XX XX XX XX @f4 @f5 @f6 @f10 -
119 | XX XX brdn brup XX XX XX XX f1 f2 f3 f12
120 | _ _ _ _ _ _ _ _ _ _ _
121 | )
122 |
123 | (deflayer disable
124 | XX XX XX XX XX XX XX XX XX XX XX XX XX
125 | XX XX XX XX XX XX XX XX XX XX XX XX XX @bse
126 | XX XX XX XX XX XX XX XX XX XX XX XX XX XX
127 | XX XX XX XX XX XX XX XX XX XX XX XX XX
128 | XX XX XX XX XX XX XX XX XX XX XX XX
129 | XX XX XX XX XX XX XX XX XX XX XX
130 | )
131 |
132 | (deflayer gaming
133 | _ _ _ _ _ _ _ _ _ _ _ _ _
134 | _ _ _ _ _ _ _ _ _ _ _ _ _ _
135 | tab q w e r t _ _ _ up _ _ _ _
136 | lsft a s d f g _ @bse lft down rght _ _
137 | lctl z x c v b _ _ _ _ _ _
138 | _ lalt esc _ spc _ _ _ _ _ _
139 | )
140 |
141 | (deflayer empty
142 | _ _ _ _ _ _ _ _ _ _ _ _ _
143 | _ _ _ _ _ _ _ _ _ _ _ _ _ _
144 | _ _ _ _ _ _ _ _ _ _ _ _ _ _
145 | _ _ _ _ _ _ _ _ _ _ _ _ _
146 | _ _ _ _ _ _ _ _ _ _ _ _
147 | _ _ _ _ _ _ _ _ _ _ _
148 | )
149 |
--------------------------------------------------------------------------------
/espanso-text-expansion.py:
--------------------------------------------------------------------------------
1 | import csv
2 |
3 | # suffix to add to the end of an abbreviation to trigger the expansion
4 | expand_trigger = ",;"
5 | # suffix to add before the trigger to use the alternate forms in `abbr.tsv`
6 | alt_suffix_1 = "q"
7 | alt_suffix_2 = "j"
8 | alt_suffix_3 = "z"
9 | seen = {}
10 | output = "matches:\n"
11 | line_no = 0
12 |
13 |
14 | def add_abbr(word, trigger):
15 | global output
16 | if trigger in seen:
17 | raise Exception(
18 | f'Error line {line_no}: already used trigger "{trigger}" for word "{seen[trigger]}"'
19 | )
20 | output += (
21 | f' - trigger: "{trigger}{expand_trigger}"\n'
22 | f' replace: "{word} "\n'
23 | f" propagate_case: true\n"
24 | f' uppercase_style: "capitalize_words"\n'
25 | f' - trigger: "{trigger}.{expand_trigger}"\n'
26 | f' replace: "{word}. "\n'
27 | f" propagate_case: true\n"
28 | f' uppercase_style: "capitalize_words"\n'
29 | f' - trigger: "{trigger},{expand_trigger}"\n'
30 | f' replace: "{word}, "\n'
31 | f" propagate_case: true\n"
32 | f' uppercase_style: "capitalize_words"\n'
33 | f' - trigger: "{trigger};{expand_trigger}"\n'
34 | f' replace: "{word}; "\n'
35 | f" propagate_case: true\n"
36 | f' uppercase_style: "capitalize_words"\n'
37 | f' - trigger: "{trigger}:{expand_trigger}"\n'
38 | f' replace: "{word}: "\n'
39 | f" propagate_case: true\n"
40 | f' uppercase_style: "capitalize_words"\n'
41 | f' - trigger: "{trigger}?{expand_trigger}"\n'
42 | f' replace: "{word}? "\n'
43 | f" propagate_case: true\n"
44 | f' uppercase_style: "capitalize_words"\n'
45 | )
46 | seen[trigger] = word
47 |
48 |
49 | print("Processing abbr.tsv")
50 | with open("abbr.tsv") as file:
51 | file = csv.reader(file, delimiter="\t")
52 | for line in file:
53 | line_no += 1
54 |
55 | if line[1]:
56 | add_abbr(line[0], line[1])
57 | if line[2]:
58 | add_abbr(line[2], f"{line[1]}{alt_suffix_1}")
59 |
60 | print("Writing abbr.yml")
61 | with open("abbr.yml", "w") as file:
62 | file.write(output)
63 | print("Done")
64 |
--------------------------------------------------------------------------------
/flake.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "flake-utils": {
4 | "inputs": {
5 | "systems": "systems"
6 | },
7 | "locked": {
8 | "lastModified": 1710146030,
9 | "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
10 | "owner": "numtide",
11 | "repo": "flake-utils",
12 | "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
13 | "type": "github"
14 | },
15 | "original": {
16 | "owner": "numtide",
17 | "repo": "flake-utils",
18 | "type": "github"
19 | }
20 | },
21 | "nixpkgs": {
22 | "locked": {
23 | "lastModified": 1722421184,
24 | "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
25 | "owner": "nixos",
26 | "repo": "nixpkgs",
27 | "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
28 | "type": "github"
29 | },
30 | "original": {
31 | "owner": "nixos",
32 | "ref": "nixos-unstable",
33 | "repo": "nixpkgs",
34 | "type": "github"
35 | }
36 | },
37 | "root": {
38 | "inputs": {
39 | "flake-utils": "flake-utils",
40 | "nixpkgs": "nixpkgs"
41 | }
42 | },
43 | "systems": {
44 | "locked": {
45 | "lastModified": 1681028828,
46 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
47 | "owner": "nix-systems",
48 | "repo": "default",
49 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
50 | "type": "github"
51 | },
52 | "original": {
53 | "owner": "nix-systems",
54 | "repo": "default",
55 | "type": "github"
56 | }
57 | }
58 | },
59 | "root": "root",
60 | "version": 7
61 | }
62 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | inputs = {
3 | nixpkgs = {
4 | url = "github:nixos/nixpkgs/nixos-unstable";
5 | };
6 | flake-utils = {
7 | url = "github:numtide/flake-utils";
8 | };
9 | };
10 | outputs = {
11 | nixpkgs,
12 | flake-utils,
13 | ...
14 | }:
15 | flake-utils.lib.eachDefaultSystem (
16 | system: let
17 | pkgs = import nixpkgs {
18 | inherit system;
19 | };
20 | in {
21 | devShell = pkgs.mkShell {
22 | buildInputs = with pkgs; [
23 | python39
24 | libmysqlclient
25 | pkg-config
26 | libffi
27 | ];
28 | shellHook = ''
29 | if [ ! -d "./venv" ]; then
30 | python3 -m venv venv
31 | fi
32 | source venv/bin/activate
33 | '';
34 | };
35 | }
36 | );
37 | }
38 |
--------------------------------------------------------------------------------
/kanata-chorded.py:
--------------------------------------------------------------------------------
1 | import csv
2 | import utils
3 |
4 | # Limit how many rows to process
5 | limit = 0
6 | # How long in ms you have to press the combo keys together, you can be pretty relaxed here if combo is its own unique key
7 | combo_timeout = 100
8 | # Configure your base mappings here
9 | mapping = {
10 | "b": "tab",
11 | "y": "q",
12 | "o": "w",
13 | "u": "e",
14 | "c": "caps",
15 | "i": "a",
16 | "e": "s",
17 | "a": "d",
18 | "g": "lsft",
19 | "x": "z",
20 | "j": "x",
21 | "k": "c",
22 | "l": "i",
23 | "d": "o",
24 | "w": "p",
25 | "v": "[",
26 | "h": "k",
27 | "t": "l",
28 | "s": ";",
29 | "n": "'",
30 | "r": ",",
31 | "m": ".",
32 | "f": "/",
33 | "p": "rsft",
34 | " ": "spc",
35 | }
36 |
37 | combo_keys = ["prtsc"]
38 | shifted_keys = ["ralt"]
39 | alt_keys = [["lalt"], ["spc"], ["lalt", "spc"]]
40 |
41 | seen = {}
42 | line_no = 0
43 |
44 | key_map = {
45 | " ": "spc",
46 | "←": "bspc",
47 | }
48 |
49 | output = "(defchordsv2-experimental\n"
50 |
51 |
52 | def translate_macro(word):
53 | result = []
54 | for i, k in enumerate(word):
55 | kp = ""
56 | if k in key_map:
57 | result.append(key_map[k])
58 | elif k.isupper():
59 | result.append("S-" + k.lower())
60 | else:
61 | result.append(k)
62 | return result
63 |
64 |
65 | def translate_combo(abbr):
66 | result = []
67 | for i, k in enumerate(abbr):
68 | if k in mapping:
69 | result.append(mapping[k])
70 | else:
71 | raise Exception(f"No key_map for {k}")
72 | return result
73 |
74 |
75 | print("Processing abbr.tsv")
76 | with open("abbr.tsv") as file:
77 | file = csv.reader(file, delimiter="\t")
78 |
79 | for line in file:
80 | line_no += 1
81 | if limit != 0 and line_no > limit:
82 | print(f"Stopping at line {limit} due to limit setting")
83 | break
84 |
85 | if line[1]:
86 | abbr = line.pop(1)
87 | if abbr in seen:
88 | raise Exception(
89 | f'Error line {line_no}: already used trigger "{abbr}" for word "{seen[abbr]}"'
90 | )
91 |
92 | combinations = utils.find_all_combinations(abbr)
93 | for a in combinations:
94 | seen[a] = line[0]
95 |
96 | for i, word in enumerate(line):
97 | if not word:
98 | continue
99 | alt = []
100 | if i != 0:
101 | alt = alt_keys[i - 1]
102 |
103 | combo = translate_combo(abbr)
104 | macro = translate_macro(word + " ")
105 |
106 | output += f' ({" ".join(combo_keys + alt)} {" ".join(combo)}) (macro {" ".join(macro)}) {combo_timeout} first-release ()\n'
107 | shifted_macro = translate_macro(word.capitalize() + " ")
108 | output += f' ({" ".join(combo_keys + alt + shifted_keys)} {" ".join(combo)}) (macro {" ".join(shifted_macro)}) {combo_timeout} first-release ()\n'
109 | output += ")"
110 |
111 |
112 | print("writing abbr.kbd")
113 | with open("abbr.kbd", "w") as file:
114 | file.write(output)
115 | print("done")
116 |
--------------------------------------------------------------------------------
/layout.py:
--------------------------------------------------------------------------------
1 | qwerty = [
2 | ["q", "w", "e", "r", "t", "y", "u", "i", "o", "p"],
3 | ["a", "s", "d", "f", "g", "h", "j", "k", "l", ";"],
4 | ["z", "x", "c", "v", "b", "n", "m", ",", ".", "/"],
5 | ]
6 | colemak = [
7 | ["q", "w", "f", "p", "g", "j", "l", "u", "y", ";"],
8 | ["a", "r", "s", "t", "d", "h", "n", "e", "i", "o"],
9 | ["z", "x", "c", "v", "b", "k", "m", ",", ".", "/"],
10 | ]
11 | colemak_dh = [
12 | ["q", "w", "f", "p", "b", "j", "l", "u", "y", ";"],
13 | ["a", "r", "s", "t", "g", "m", "n", "e", "i", "o"],
14 | ["z", "x", "c", "d", "v", "k", "h", ",", ".", "/"],
15 | ]
16 | canary = [
17 | ["w", "l", "y", "p", "b", "z", "f", "o", "u", "'"],
18 | ["c", "r", "s", "t", "g", "m", "n", "e", "i", "a"],
19 | ["q", "j", "v", "d", "k", "x", "h", ";", ",", "."],
20 | ]
21 | engram = [
22 | ["b", "y", "o", "u", "", "", "l", "d", "v", "w"],
23 | ["c", "i", "e", "a", "", "", "h", "t", "s", "n"],
24 | ["g", "x", "j", "k", "", "", "r", "m", "f", "p"],
25 | ]
26 |
27 | # https://colemakmods.github.io/mod-dh/model.html
28 | effort_map_standard = [
29 | [3, 2.5, 2.1, 2.3, 2.6, 3.4, 2.2, 2.0, 2.4, 3.0],
30 | [1.6, 1.3, 1.1, 1.0, 2.9, 2.9, 1.0, 1.1, 1.3, 1.6],
31 | [2.7, 2.4, 1.8, 2.2, 3.7, 2.2, 1.8, 2.4, 2.7, 3.3],
32 | ]
33 | effort_map_matrix = [
34 | [3, 2.4, 2.0, 2.2, 3.2, 3.2, 2.2, 2.0, 2.4, 3],
35 | [1.6, 1.3, 1.1, 1.0, 2.9, 2.9, 1.0, 1.1, 1.3, 1.6],
36 | [3.2, 2.6, 2.3, 1.6, 3.0, 3.0, 1.6, 2.3, 2.6, 3.2],
37 | ]
38 |
--------------------------------------------------------------------------------
/macros.dtsi:
--------------------------------------------------------------------------------
1 | #define MACRO(NAME, BINDINGS) \
2 | macro_##NAME: macro_##NAME { \
3 | compatible = "zmk,behavior-macro"; \
4 | #binding-cells = <0>; \
5 | wait-ms = <0>; \
6 | tap-ms = <10>; \
7 | bindings = ; \
8 | };
9 |
10 | MACRO(c_SEMI, &kp BSPC &kp SEMI &kp SPC)
11 | MACRO(c_COMMA, &kp BSPC &kp COMMA &kp SPC)
12 | MACRO(c_DOT, &kp BSPC &kp DOT &kp SPC)
13 | MACRO(c_t, &kp T &kp H &kp E &kp SPC)
14 | MACRO(s_c_t, &kp LS(T) &kp H &kp E &kp SPC)
15 | MACRO(c_a, &kp A &kp N &kp D &kp SPC)
16 | MACRO(s_c_a, &kp LS(A) &kp N &kp D &kp SPC)
17 | MACRO(c_y, &kp Y &kp O &kp U &kp SPC)
18 | MACRO(s_c_y, &kp LS(Y) &kp O &kp U &kp SPC)
19 | MACRO(c_h, &kp H &kp A &kp V &kp E &kp SPC)
20 | MACRO(s_c_h, &kp LS(H) &kp A &kp V &kp E &kp SPC)
21 | MACRO(c_th, &kp T &kp H &kp A &kp T &kp SPC)
22 | MACRO(s_c_th, &kp LS(T) &kp H &kp A &kp T &kp SPC)
23 | MACRO(c_yr, &kp Y &kp O &kp U &kp R &kp SPC)
24 | MACRO(s_c_yr, &kp LS(Y) &kp O &kp U &kp R &kp SPC)
25 | MACRO(c_yr_, &kp Y &kp O &kp U &kp R &kp S &kp SPC)
26 | MACRO(s_c_yr_, &kp LS(Y) &kp O &kp U &kp R &kp S &kp SPC)
27 | MACRO(c_c, &kp C &kp A &kp N &kp SPC)
28 | MACRO(s_c_c, &kp LS(C) &kp A &kp N &kp SPC)
29 | MACRO(c_b, &kp B &kp U &kp T &kp SPC)
30 | MACRO(s_c_b, &kp LS(B) &kp U &kp T &kp SPC)
31 | MACRO(c_w, &kp W &kp I &kp L &kp L &kp SPC)
32 | MACRO(s_c_w, &kp LS(W) &kp I &kp L &kp L &kp SPC)
33 | MACRO(c_te, &kp T &kp H &kp E &kp Y &kp SPC)
34 | MACRO(s_c_te, &kp LS(T) &kp H &kp E &kp Y &kp SPC)
35 | MACRO(c_ti, &kp T &kp H &kp I &kp S &kp SPC)
36 | MACRO(s_c_ti, &kp LS(T) &kp H &kp I &kp S &kp SPC)
37 | MACRO(c_wh, &kp W &kp H &kp I &kp C &kp H &kp SPC)
38 | MACRO(s_c_wh, &kp LS(W) &kp H &kp I &kp C &kp H &kp SPC)
39 | MACRO(c_s, &kp S &kp A &kp Y &kp SPC)
40 | MACRO(s_c_s, &kp LS(S) &kp A &kp Y &kp SPC)
41 | MACRO(c_s_, &kp S &kp A &kp Y &kp S &kp SPC)
42 | MACRO(s_c_s_, &kp LS(S) &kp A &kp Y &kp S &kp SPC)
43 | MACRO(c_s__, &kp S &kp A &kp I &kp D &kp SPC)
44 | MACRO(s_c_s__, &kp LS(S) &kp A &kp I &kp D &kp SPC)
45 | MACRO(c_s___, &kp S &kp A &kp Y &kp I &kp N &kp G &kp SPC)
46 | MACRO(s_c_s___, &kp LS(S) &kp A &kp Y &kp I &kp N &kp G &kp SPC)
47 | MACRO(c_m, &kp M &kp A &kp K &kp E &kp SPC)
48 | MACRO(s_c_m, &kp LS(M) &kp A &kp K &kp E &kp SPC)
49 | MACRO(c_m_, &kp M &kp A &kp K &kp E &kp S &kp SPC)
50 | MACRO(s_c_m_, &kp LS(M) &kp A &kp K &kp E &kp S &kp SPC)
51 | MACRO(c_m__, &kp M &kp A &kp D &kp E &kp SPC)
52 | MACRO(s_c_m__, &kp LS(M) &kp A &kp D &kp E &kp SPC)
53 | MACRO(c_m___, &kp M &kp A &kp K &kp I &kp N &kp G &kp SPC)
54 | MACRO(s_c_m___, &kp LS(M) &kp A &kp K &kp I &kp N &kp G &kp SPC)
55 | MACRO(c_tr, &kp T &kp H &kp E &kp I &kp R &kp SPC)
56 | MACRO(s_c_tr, &kp LS(T) &kp H &kp E &kp I &kp R &kp SPC)
57 | MACRO(c_tr_, &kp T &kp H &kp E &kp I &kp R &kp S &kp SPC)
58 | MACRO(s_c_tr_, &kp LS(T) &kp H &kp E &kp I &kp R &kp S &kp SPC)
59 | MACRO(c_as, &kp A &kp L &kp S &kp O &kp SPC)
60 | MACRO(s_c_as, &kp LS(A) &kp L &kp S &kp O &kp SPC)
61 | MACRO(c_u, &kp U &kp S &kp E &kp SPC)
62 | MACRO(s_c_u, &kp LS(U) &kp S &kp E &kp SPC)
63 | MACRO(c_u_, &kp U &kp S &kp E &kp S &kp SPC)
64 | MACRO(s_c_u_, &kp LS(U) &kp S &kp E &kp S &kp SPC)
65 | MACRO(c_u__, &kp U &kp S &kp E &kp D &kp SPC)
66 | MACRO(s_c_u__, &kp LS(U) &kp S &kp E &kp D &kp SPC)
67 | MACRO(c_u___, &kp U &kp S &kp I &kp N &kp G &kp SPC)
68 | MACRO(s_c_u___, &kp LS(U) &kp S &kp I &kp N &kp G &kp SPC)
69 | MACRO(c_we, &kp W &kp H &kp E &kp N &kp SPC)
70 | MACRO(s_c_we, &kp LS(W) &kp H &kp E &kp N &kp SPC)
71 | MACRO(c_o, &kp O &kp T &kp H &kp E &kp R &kp SPC)
72 | MACRO(s_c_o, &kp LS(O) &kp T &kp H &kp E &kp R &kp SPC)
73 | MACRO(c_ta, &kp T &kp A &kp K &kp E &kp SPC)
74 | MACRO(s_c_ta, &kp LS(T) &kp A &kp K &kp E &kp SPC)
75 | MACRO(c_ta_, &kp T &kp A &kp K &kp E &kp S &kp SPC)
76 | MACRO(s_c_ta_, &kp LS(T) &kp A &kp K &kp E &kp S &kp SPC)
77 | MACRO(c_ta__, &kp T &kp O &kp O &kp K &kp SPC)
78 | MACRO(s_c_ta__, &kp LS(T) &kp O &kp O &kp K &kp SPC)
79 | MACRO(c_ta___, &kp T &kp A &kp K &kp I &kp N &kp G &kp SPC)
80 | MACRO(s_c_ta___, &kp LS(T) &kp A &kp K &kp I &kp N &kp G &kp SPC)
81 | MACRO(c_wo, &kp W &kp O &kp U &kp L &kp D &kp SPC)
82 | MACRO(s_c_wo, &kp LS(W) &kp O &kp U &kp L &kp D &kp SPC)
83 | MACRO(c_g, &kp G &kp E &kp T &kp SPC)
84 | MACRO(s_c_g, &kp LS(G) &kp E &kp T &kp SPC)
85 | MACRO(c_g_, &kp G &kp E &kp T &kp S &kp SPC)
86 | MACRO(s_c_g_, &kp LS(G) &kp E &kp T &kp S &kp SPC)
87 | MACRO(c_g__, &kp G &kp O &kp T &kp SPC)
88 | MACRO(s_c_g__, &kp LS(G) &kp O &kp T &kp SPC)
89 | MACRO(c_g___, &kp G &kp E &kp T &kp T &kp I &kp N &kp G &kp SPC)
90 | MACRO(s_c_g___, &kp LS(G) &kp E &kp T &kp T &kp I &kp N &kp G &kp SPC)
91 | MACRO(c_gd, &kp G &kp O &kp O &kp D &kp SPC)
92 | MACRO(s_c_gd, &kp LS(G) &kp O &kp O &kp D &kp SPC)
93 | MACRO(c_p, &kp P &kp E &kp O &kp P &kp L &kp E &kp SPC)
94 | MACRO(s_c_p, &kp LS(P) &kp E &kp O &kp P &kp L &kp E &kp SPC)
95 | MACRO(c_p_, &kp P &kp E &kp O &kp P &kp L &kp E &kp S &kp SPC)
96 | MACRO(s_c_p_, &kp LS(P) &kp E &kp O &kp P &kp L &kp E &kp S &kp SPC)
97 | MACRO(c_k, &kp K &kp N &kp O &kp W &kp SPC)
98 | MACRO(s_c_k, &kp LS(K) &kp N &kp O &kp W &kp SPC)
99 | MACRO(c_k_, &kp K &kp N &kp O &kp W &kp S &kp SPC)
100 | MACRO(s_c_k_, &kp LS(K) &kp N &kp O &kp W &kp S &kp SPC)
101 | MACRO(c_k__, &kp K &kp N &kp E &kp W &kp SPC)
102 | MACRO(s_c_k__, &kp LS(K) &kp N &kp E &kp W &kp SPC)
103 | MACRO(c_k___, &kp K &kp N &kp O &kp W &kp I &kp N &kp G &kp SPC)
104 | MACRO(s_c_k___, &kp LS(K) &kp N &kp O &kp W &kp I &kp N &kp G &kp SPC)
105 | MACRO(c_ya, &kp Y &kp E &kp A &kp R &kp SPC)
106 | MACRO(s_c_ya, &kp LS(Y) &kp E &kp A &kp R &kp SPC)
107 | MACRO(c_ya_, &kp Y &kp E &kp A &kp R &kp S &kp SPC)
108 | MACRO(s_c_ya_, &kp LS(Y) &kp E &kp A &kp R &kp S &kp SPC)
109 | MACRO(c_i, &kp I &kp T &kp S &kp SPC)
110 | MACRO(s_c_i, &kp LS(I) &kp T &kp S &kp SPC)
111 | MACRO(c_me, &kp M &kp O &kp R &kp E &kp SPC)
112 | MACRO(s_c_me, &kp LS(M) &kp O &kp R &kp E &kp SPC)
113 | MACRO(c_se, &kp S &kp O &kp M &kp E &kp SPC)
114 | MACRO(s_c_se, &kp LS(S) &kp O &kp M &kp E &kp SPC)
115 | MACRO(c_the, &kp T &kp H &kp E &kp R &kp E &kp SPC)
116 | MACRO(s_c_the, &kp LS(T) &kp H &kp E &kp R &kp E &kp SPC)
117 | MACRO(c_tn, &kp T &kp H &kp E &kp N &kp SPC)
118 | MACRO(s_c_tn, &kp LS(T) &kp H &kp E &kp N &kp SPC)
119 | MACRO(c_whe, &kp W &kp H &kp E &kp R &kp E &kp SPC)
120 | MACRO(s_c_whe, &kp LS(W) &kp H &kp E &kp R &kp E &kp SPC)
121 | MACRO(c_tk, &kp T &kp H &kp I &kp N &kp K &kp SPC)
122 | MACRO(s_c_tk, &kp LS(T) &kp H &kp I &kp N &kp K &kp SPC)
123 | MACRO(c_tk_, &kp T &kp H &kp I &kp N &kp K &kp S &kp SPC)
124 | MACRO(s_c_tk_, &kp LS(T) &kp H &kp I &kp N &kp K &kp S &kp SPC)
125 | MACRO(c_tk__, &kp T &kp H &kp O &kp U &kp G &kp H &kp T &kp SPC)
126 | MACRO(s_c_tk__, &kp LS(T) &kp H &kp O &kp U &kp G &kp H &kp T &kp SPC)
127 | MACRO(c_tk___, &kp T &kp H &kp I &kp N &kp K &kp I &kp N &kp G &kp SPC)
128 | MACRO(s_c_tk___, &kp LS(T) &kp H &kp I &kp N &kp K &kp I &kp N &kp G &kp SPC)
129 | MACRO(c_ce, &kp C &kp O &kp M &kp E &kp SPC)
130 | MACRO(s_c_ce, &kp LS(C) &kp O &kp M &kp E &kp SPC)
131 | MACRO(c_ce_, &kp C &kp O &kp M &kp E &kp S &kp SPC)
132 | MACRO(s_c_ce_, &kp LS(C) &kp O &kp M &kp E &kp S &kp SPC)
133 | MACRO(c_ce__, &kp C &kp A &kp M &kp E &kp SPC)
134 | MACRO(s_c_ce__, &kp LS(C) &kp A &kp M &kp E &kp SPC)
135 | MACRO(c_ce___, &kp C &kp O &kp M &kp I &kp N &kp G &kp SPC)
136 | MACRO(s_c_ce___, &kp LS(C) &kp O &kp M &kp I &kp N &kp G &kp SPC)
137 | MACRO(c_wa, &kp W &kp H &kp A &kp T &kp SPC)
138 | MACRO(s_c_wa, &kp LS(W) &kp H &kp A &kp T &kp SPC)
139 | MACRO(c_f, &kp F &kp I &kp N &kp D &kp SPC)
140 | MACRO(s_c_f, &kp LS(F) &kp I &kp N &kp D &kp SPC)
141 | MACRO(c_f_, &kp F &kp I &kp N &kp D &kp S &kp SPC)
142 | MACRO(s_c_f_, &kp LS(F) &kp I &kp N &kp D &kp S &kp SPC)
143 | MACRO(c_f__, &kp F &kp O &kp U &kp N &kp D &kp SPC)
144 | MACRO(s_c_f__, &kp LS(F) &kp O &kp U &kp N &kp D &kp SPC)
145 | MACRO(c_f___, &kp F &kp I &kp N &kp D &kp I &kp N &kp G &kp SPC)
146 | MACRO(s_c_f___, &kp LS(F) &kp I &kp N &kp D &kp I &kp N &kp G &kp SPC)
147 | MACRO(c_ts, &kp T &kp H &kp E &kp S &kp E &kp SPC)
148 | MACRO(s_c_ts, &kp LS(T) &kp H &kp E &kp S &kp E &kp SPC)
149 | MACRO(c_co, &kp C &kp O &kp U &kp L &kp D &kp SPC)
150 | MACRO(s_c_co, &kp LS(C) &kp O &kp U &kp L &kp D &kp SPC)
151 | MACRO(c_ft, &kp F &kp I &kp R &kp S &kp T &kp SPC)
152 | MACRO(s_c_ft, &kp LS(F) &kp I &kp R &kp S &kp T &kp SPC)
153 | MACRO(c_v, &kp V &kp E &kp R &kp Y &kp SPC)
154 | MACRO(s_c_v, &kp LS(V) &kp E &kp R &kp Y &kp SPC)
155 | MACRO(c_ie, &kp I &kp N &kp C &kp L &kp U &kp D &kp E &kp SPC)
156 | MACRO(s_c_ie, &kp LS(I) &kp N &kp C &kp L &kp U &kp D &kp E &kp SPC)
157 | MACRO(c_ie_, &kp I &kp N &kp C &kp L &kp U &kp D &kp E &kp S &kp SPC)
158 | MACRO(s_c_ie_, &kp LS(I) &kp N &kp C &kp L &kp U &kp D &kp E &kp S &kp SPC)
159 | MACRO(c_ie__, &kp I &kp N &kp C &kp L &kp U &kp D &kp E &kp D &kp SPC)
160 | MACRO(s_c_ie__, &kp LS(I) &kp N &kp C &kp L &kp U &kp D &kp E &kp D &kp SPC)
161 | MACRO(c_ie___, &kp I &kp N &kp C &kp L &kp U &kp D &kp I &kp N &kp G &kp SPC)
162 | MACRO(s_c_ie___, &kp LS(I) &kp N &kp C &kp L &kp U &kp D &kp I &kp N &kp G &kp SPC)
163 | MACRO(c_on, &kp O &kp N &kp L &kp Y &kp SPC)
164 | MACRO(s_c_on, &kp LS(O) &kp N &kp L &kp Y &kp SPC)
165 | MACRO(c_d, &kp D &kp A &kp Y &kp SPC)
166 | MACRO(s_c_d, &kp LS(D) &kp A &kp Y &kp SPC)
167 | MACRO(c_d_, &kp D &kp A &kp Y &kp S &kp SPC)
168 | MACRO(s_c_d_, &kp LS(D) &kp A &kp Y &kp S &kp SPC)
169 | MACRO(c_j, &kp J &kp U &kp S &kp T &kp SPC)
170 | MACRO(s_c_j, &kp LS(J) &kp U &kp S &kp T &kp SPC)
171 | MACRO(c_ge, &kp G &kp I &kp V &kp E &kp SPC)
172 | MACRO(s_c_ge, &kp LS(G) &kp I &kp V &kp E &kp SPC)
173 | MACRO(c_ge_, &kp G &kp I &kp V &kp E &kp S &kp SPC)
174 | MACRO(s_c_ge_, &kp LS(G) &kp I &kp V &kp E &kp S &kp SPC)
175 | MACRO(c_ge__, &kp G &kp A &kp V &kp E &kp SPC)
176 | MACRO(s_c_ge__, &kp LS(G) &kp A &kp V &kp E &kp SPC)
177 | MACRO(c_ge___, &kp G &kp I &kp V &kp I &kp N &kp G &kp SPC)
178 | MACRO(s_c_ge___, &kp LS(G) &kp I &kp V &kp I &kp N &kp G &kp SPC)
179 | MACRO(c_sh, &kp S &kp U &kp C &kp H &kp SPC)
180 | MACRO(s_c_sh, &kp LS(S) &kp U &kp C &kp H &kp SPC)
181 | MACRO(c_ma, &kp M &kp A &kp N &kp Y &kp SPC)
182 | MACRO(s_c_ma, &kp LS(M) &kp A &kp N &kp Y &kp SPC)
183 | MACRO(c_so, &kp S &kp H &kp O &kp U &kp L &kp D &kp SPC)
184 | MACRO(s_c_so, &kp LS(S) &kp H &kp O &kp U &kp L &kp D &kp SPC)
185 | MACRO(c_wl, &kp W &kp E &kp L &kp L &kp SPC)
186 | MACRO(s_c_wl, &kp LS(W) &kp E &kp L &kp L &kp SPC)
187 | MACRO(c_ae, &kp A &kp R &kp E &kp A &kp SPC)
188 | MACRO(s_c_ae, &kp LS(A) &kp R &kp E &kp A &kp SPC)
189 | MACRO(c_ae_, &kp A &kp R &kp E &kp A &kp S &kp SPC)
190 | MACRO(s_c_ae_, &kp LS(A) &kp R &kp E &kp A &kp S &kp SPC)
191 | MACRO(c_n, &kp N &kp E &kp E &kp D &kp SPC)
192 | MACRO(s_c_n, &kp LS(N) &kp E &kp E &kp D &kp SPC)
193 | MACRO(c_n_, &kp N &kp E &kp E &kp D &kp S &kp SPC)
194 | MACRO(s_c_n_, &kp LS(N) &kp E &kp E &kp D &kp S &kp SPC)
195 | MACRO(c_n__, &kp N &kp E &kp E &kp D &kp E &kp D &kp SPC)
196 | MACRO(s_c_n__, &kp LS(N) &kp E &kp E &kp D &kp E &kp D &kp SPC)
197 | MACRO(c_n___, &kp N &kp E &kp E &kp D &kp I &kp N &kp G &kp SPC)
198 | MACRO(s_c_n___, &kp LS(N) &kp E &kp E &kp D &kp I &kp N &kp G &kp SPC)
199 | MACRO(c_ms, &kp M &kp O &kp S &kp T &kp SPC)
200 | MACRO(s_c_ms, &kp LS(M) &kp O &kp S &kp T &kp SPC)
201 | MACRO(c_ct, &kp C &kp I &kp T &kp Y &kp SPC)
202 | MACRO(s_c_ct, &kp LS(C) &kp I &kp T &kp Y &kp SPC)
203 | MACRO(c_ct_, &kp C &kp I &kp T &kp I &kp E &kp S &kp SPC)
204 | MACRO(s_c_ct_, &kp LS(C) &kp I &kp T &kp I &kp E &kp S &kp SPC)
205 | MACRO(c_ia, &kp I &kp M &kp A &kp G &kp E &kp SPC)
206 | MACRO(s_c_ia, &kp LS(I) &kp M &kp A &kp G &kp E &kp SPC)
207 | MACRO(c_ia_, &kp I &kp M &kp A &kp G &kp E &kp S &kp SPC)
208 | MACRO(s_c_ia_, &kp LS(I) &kp M &kp A &kp G &kp E &kp S &kp SPC)
209 | MACRO(c_l, &kp L &kp O &kp O &kp K &kp SPC)
210 | MACRO(s_c_l, &kp LS(L) &kp O &kp O &kp K &kp SPC)
211 | MACRO(c_l_, &kp L &kp O &kp O &kp K &kp S &kp SPC)
212 | MACRO(s_c_l_, &kp LS(L) &kp O &kp O &kp K &kp S &kp SPC)
213 | MACRO(c_l__, &kp L &kp O &kp O &kp K &kp E &kp D &kp SPC)
214 | MACRO(s_c_l__, &kp LS(L) &kp O &kp O &kp K &kp E &kp D &kp SPC)
215 | MACRO(c_l___, &kp L &kp O &kp O &kp K &kp I &kp N &kp G &kp SPC)
216 | MACRO(s_c_l___, &kp LS(L) &kp O &kp O &kp K &kp I &kp N &kp G &kp SPC)
217 | MACRO(c_hi, &kp H &kp I &kp G &kp H &kp SPC)
218 | MACRO(s_c_hi, &kp LS(H) &kp I &kp G &kp H &kp SPC)
219 | MACRO(c_le, &kp L &kp I &kp F &kp E &kp SPC)
220 | MACRO(s_c_le, &kp LS(L) &kp I &kp F &kp E &kp SPC)
221 | MACRO(c_le_, &kp L &kp I &kp V &kp E &kp S &kp SPC)
222 | MACRO(s_c_le_, &kp LS(L) &kp I &kp V &kp E &kp S &kp SPC)
223 | MACRO(c_wi, &kp W &kp H &kp I &kp L &kp E &kp SPC)
224 | MACRO(s_c_wi, &kp LS(W) &kp H &kp I &kp L &kp E &kp SPC)
225 | MACRO(c_ba, &kp B &kp E &kp C &kp A &kp U &kp S &kp E &kp SPC)
226 | MACRO(s_c_ba, &kp LS(B) &kp E &kp C &kp A &kp U &kp S &kp E &kp SPC)
227 | MACRO(c_thi, &kp T &kp H &kp I &kp N &kp G &kp SPC)
228 | MACRO(s_c_thi, &kp LS(T) &kp H &kp I &kp N &kp G &kp SPC)
229 | MACRO(c_thi_, &kp T &kp H &kp I &kp N &kp G &kp S &kp SPC)
230 | MACRO(s_c_thi_, &kp LS(T) &kp H &kp I &kp N &kp G &kp S &kp SPC)
231 | MACRO(c_bo, &kp B &kp E &kp C &kp O &kp M &kp E &kp SPC)
232 | MACRO(s_c_bo, &kp LS(B) &kp E &kp C &kp O &kp M &kp E &kp SPC)
233 | MACRO(c_bo_, &kp B &kp E &kp C &kp O &kp M &kp E &kp S &kp SPC)
234 | MACRO(s_c_bo_, &kp LS(B) &kp E &kp C &kp O &kp M &kp E &kp S &kp SPC)
235 | MACRO(c_bo__, &kp B &kp E &kp C &kp A &kp M &kp E &kp SPC)
236 | MACRO(s_c_bo__, &kp LS(B) &kp E &kp C &kp A &kp M &kp E &kp SPC)
237 | MACRO(c_bo___, &kp B &kp E &kp C &kp O &kp M &kp I &kp N &kp G &kp SPC)
238 | MACRO(s_c_bo___, &kp LS(B) &kp E &kp C &kp O &kp M &kp I &kp N &kp G &kp SPC)
239 | MACRO(c_he, &kp H &kp O &kp W &kp E &kp V &kp E &kp R &kp SPC)
240 | MACRO(s_c_he, &kp LS(H) &kp O &kp W &kp E &kp V &kp E &kp R &kp SPC)
241 | MACRO(c_pa, &kp P &kp A &kp R &kp T &kp SPC)
242 | MACRO(s_c_pa, &kp LS(P) &kp A &kp R &kp T &kp SPC)
243 | MACRO(c_pa_, &kp P &kp A &kp R &kp T &kp S &kp SPC)
244 | MACRO(s_c_pa_, &kp LS(P) &kp A &kp R &kp T &kp S &kp SPC)
245 | MACRO(c_ga, &kp G &kp R &kp E &kp A &kp T &kp SPC)
246 | MACRO(s_c_ga, &kp LS(G) &kp R &kp E &kp A &kp T &kp SPC)
247 | MACRO(c_wk, &kp W &kp O &kp R &kp K &kp SPC)
248 | MACRO(s_c_wk, &kp LS(W) &kp O &kp R &kp K &kp SPC)
249 | MACRO(c_wk_, &kp W &kp O &kp R &kp K &kp S &kp SPC)
250 | MACRO(s_c_wk_, &kp LS(W) &kp O &kp R &kp K &kp S &kp SPC)
251 | MACRO(c_wk__, &kp W &kp O &kp R &kp K &kp E &kp D &kp SPC)
252 | MACRO(s_c_wk__, &kp LS(W) &kp O &kp R &kp K &kp E &kp D &kp SPC)
253 | MACRO(c_wk___, &kp W &kp O &kp R &kp K &kp I &kp N &kp G &kp SPC)
254 | MACRO(s_c_wk___, &kp LS(W) &kp O &kp R &kp K &kp I &kp N &kp G &kp SPC)
255 | MACRO(c_la, &kp L &kp A &kp R &kp G &kp E &kp SPC)
256 | MACRO(s_c_la, &kp LS(L) &kp A &kp R &kp G &kp E &kp SPC)
257 | MACRO(c_sl, &kp S &kp M &kp A &kp L &kp L &kp SPC)
258 | MACRO(s_c_sl, &kp LS(S) &kp M &kp A &kp L &kp L &kp SPC)
259 | MACRO(c_cn, &kp C &kp O &kp U &kp N &kp T &kp R &kp Y &kp SPC)
260 | MACRO(s_c_cn, &kp LS(C) &kp O &kp U &kp N &kp T &kp R &kp Y &kp SPC)
261 | MACRO(c_cn_, &kp C &kp O &kp U &kp N &kp T &kp R &kp I &kp E &kp S &kp SPC)
262 | MACRO(s_c_cn_, &kp LS(C) &kp O &kp U &kp N &kp T &kp R &kp I &kp E &kp S &kp SPC)
263 | MACRO(c_e, &kp E &kp V &kp E &kp N &kp SPC)
264 | MACRO(s_c_e, &kp LS(E) &kp V &kp E &kp N &kp SPC)
265 | MACRO(c_sd, &kp S &kp T &kp U &kp D &kp Y &kp SPC)
266 | MACRO(s_c_sd, &kp LS(S) &kp T &kp U &kp D &kp Y &kp SPC)
267 | MACRO(c_sd_, &kp S &kp T &kp U &kp D &kp I &kp E &kp S &kp SPC)
268 | MACRO(s_c_sd_, &kp LS(S) &kp T &kp U &kp D &kp I &kp E &kp S &kp SPC)
269 | MACRO(c_fo, &kp F &kp O &kp L &kp L &kp O &kp W &kp SPC)
270 | MACRO(s_c_fo, &kp LS(F) &kp O &kp L &kp L &kp O &kp W &kp SPC)
271 | MACRO(c_fo_, &kp F &kp O &kp L &kp L &kp O &kp W &kp S &kp SPC)
272 | MACRO(s_c_fo_, &kp LS(F) &kp O &kp L &kp L &kp O &kp W &kp S &kp SPC)
273 | MACRO(c_fo__, &kp F &kp O &kp L &kp L &kp O &kp W &kp E &kp D &kp SPC)
274 | MACRO(s_c_fo__, &kp LS(F) &kp O &kp L &kp L &kp O &kp W &kp E &kp D &kp SPC)
275 | MACRO(c_fo___, &kp F &kp O &kp L &kp L &kp O &kp W &kp I &kp N &kp G &kp SPC)
276 | MACRO(s_c_fo___, &kp LS(F) &kp O &kp L &kp L &kp O &kp W &kp I &kp N &kp G &kp SPC)
277 | MACRO(c_ste, &kp S &kp Y &kp S &kp T &kp E &kp M &kp SPC)
278 | MACRO(s_c_ste, &kp LS(S) &kp Y &kp S &kp T &kp E &kp M &kp SPC)
279 | MACRO(c_ste_, &kp S &kp Y &kp S &kp T &kp E &kp M &kp S &kp SPC)
280 | MACRO(s_c_ste_, &kp LS(S) &kp Y &kp S &kp T &kp E &kp M &kp S &kp SPC)
281 | MACRO(c_de, &kp D &kp I &kp F &kp F &kp E &kp R &kp E &kp N &kp T &kp SPC)
282 | MACRO(s_c_de, &kp LS(D) &kp I &kp F &kp F &kp E &kp R &kp E &kp N &kp T &kp SPC)
283 | MACRO(c_lea, &kp L &kp E &kp A &kp V &kp E &kp SPC)
284 | MACRO(s_c_lea, &kp LS(L) &kp E &kp A &kp V &kp E &kp SPC)
285 | MACRO(c_lea_, &kp L &kp E &kp A &kp V &kp E &kp S &kp SPC)
286 | MACRO(s_c_lea_, &kp LS(L) &kp E &kp A &kp V &kp E &kp S &kp SPC)
287 | MACRO(c_lea__, &kp L &kp E &kp A &kp V &kp E &kp D &kp SPC)
288 | MACRO(s_c_lea__, &kp LS(L) &kp E &kp A &kp V &kp E &kp D &kp SPC)
289 | MACRO(c_lea___, &kp L &kp E &kp A &kp V &kp I &kp N &kp G &kp SPC)
290 | MACRO(s_c_lea___, &kp LS(L) &kp E &kp A &kp V &kp I &kp N &kp G &kp SPC)
291 | MACRO(c_pe, &kp P &kp L &kp A &kp C &kp E &kp SPC)
292 | MACRO(s_c_pe, &kp LS(P) &kp L &kp A &kp C &kp E &kp SPC)
293 | MACRO(c_pe_, &kp P &kp L &kp A &kp C &kp E &kp S &kp SPC)
294 | MACRO(s_c_pe_, &kp LS(P) &kp L &kp A &kp C &kp E &kp S &kp SPC)
295 | MACRO(c_hp, &kp H &kp E &kp L &kp P &kp SPC)
296 | MACRO(s_c_hp, &kp LS(H) &kp E &kp L &kp P &kp SPC)
297 | MACRO(c_hp_, &kp H &kp E &kp L &kp P &kp S &kp SPC)
298 | MACRO(s_c_hp_, &kp LS(H) &kp E &kp L &kp P &kp S &kp SPC)
299 | MACRO(c_hp__, &kp H &kp E &kp L &kp P &kp E &kp D &kp SPC)
300 | MACRO(s_c_hp__, &kp LS(H) &kp E &kp L &kp P &kp E &kp D &kp SPC)
301 | MACRO(c_hp___, &kp H &kp E &kp L &kp P &kp I &kp N &kp G &kp SPC)
302 | MACRO(s_c_hp___, &kp LS(H) &kp E &kp L &kp P &kp I &kp N &kp G &kp SPC)
303 | MACRO(c_r, &kp R &kp U &kp N &kp SPC)
304 | MACRO(s_c_r, &kp LS(R) &kp U &kp N &kp SPC)
305 | MACRO(c_r_, &kp R &kp U &kp N &kp S &kp SPC)
306 | MACRO(s_c_r_, &kp LS(R) &kp U &kp N &kp S &kp SPC)
307 | MACRO(c_r__, &kp R &kp A &kp N &kp SPC)
308 | MACRO(s_c_r__, &kp LS(R) &kp A &kp N &kp SPC)
309 | MACRO(c_r___, &kp R &kp U &kp N &kp N &kp I &kp N &kp G &kp SPC)
310 | MACRO(s_c_r___, &kp LS(R) &kp U &kp N &kp N &kp I &kp N &kp G &kp SPC)
311 | MACRO(c_ch, &kp C &kp H &kp I &kp L &kp D &kp SPC)
312 | MACRO(s_c_ch, &kp LS(C) &kp H &kp I &kp L &kp D &kp SPC)
313 | MACRO(c_ch_, &kp C &kp H &kp I &kp L &kp D &kp R &kp E &kp N &kp SPC)
314 | MACRO(s_c_ch_, &kp LS(C) &kp H &kp I &kp L &kp D &kp R &kp E &kp N &kp SPC)
315 | MACRO(c_ne, &kp N &kp U &kp M &kp B &kp E &kp R &kp SPC)
316 | MACRO(s_c_ne, &kp LS(N) &kp U &kp M &kp B &kp E &kp R &kp SPC)
317 | MACRO(c_ne_, &kp N &kp U &kp M &kp B &kp E &kp R &kp S &kp SPC)
318 | MACRO(s_c_ne_, &kp LS(N) &kp U &kp M &kp B &kp E &kp R &kp S &kp SPC)
319 | MACRO(c_mh, &kp M &kp U &kp C &kp H &kp SPC)
320 | MACRO(s_c_mh, &kp LS(M) &kp U &kp C &kp H &kp SPC)
321 | MACRO(c_ca, &kp C &kp A &kp L &kp L &kp SPC)
322 | MACRO(s_c_ca, &kp LS(C) &kp A &kp L &kp L &kp SPC)
323 | MACRO(c_ca_, &kp C &kp A &kp L &kp L &kp S &kp SPC)
324 | MACRO(s_c_ca_, &kp LS(C) &kp A &kp L &kp L &kp S &kp SPC)
325 | MACRO(c_ca__, &kp C &kp A &kp L &kp L &kp E &kp D &kp SPC)
326 | MACRO(s_c_ca__, &kp LS(C) &kp A &kp L &kp L &kp E &kp D &kp SPC)
327 | MACRO(c_ca___, &kp C &kp A &kp L &kp L &kp I &kp N &kp G &kp SPC)
328 | MACRO(s_c_ca___, &kp LS(C) &kp A &kp L &kp L &kp I &kp N &kp G &kp SPC)
329 | MACRO(c_tl, &kp T &kp E &kp L &kp L &kp SPC)
330 | MACRO(s_c_tl, &kp LS(T) &kp E &kp L &kp L &kp SPC)
331 | MACRO(c_tl_, &kp T &kp E &kp L &kp L &kp S &kp SPC)
332 | MACRO(s_c_tl_, &kp LS(T) &kp E &kp L &kp L &kp S &kp SPC)
333 | MACRO(c_tl__, &kp T &kp O &kp L &kp D &kp SPC)
334 | MACRO(s_c_tl__, &kp LS(T) &kp O &kp L &kp D &kp SPC)
335 | MACRO(c_tl___, &kp T &kp E &kp L &kp L &kp I &kp N &kp G &kp SPC)
336 | MACRO(s_c_tl___, &kp LS(T) &kp E &kp L &kp L &kp I &kp N &kp G &kp SPC)
337 | MACRO(c_wae, &kp W &kp A &kp T &kp E &kp R &kp SPC)
338 | MACRO(s_c_wae, &kp LS(W) &kp A &kp T &kp E &kp R &kp SPC)
339 | MACRO(c_wae_, &kp W &kp A &kp T &kp E &kp R &kp SPC)
340 | MACRO(s_c_wae_, &kp LS(W) &kp A &kp T &kp E &kp R &kp SPC)
341 | MACRO(c_si, &kp S &kp E &kp R &kp V &kp I &kp C &kp E &kp SPC)
342 | MACRO(s_c_si, &kp LS(S) &kp E &kp R &kp V &kp I &kp C &kp E &kp SPC)
343 | MACRO(c_si_, &kp S &kp E &kp R &kp V &kp I &kp C &kp E &kp S &kp SPC)
344 | MACRO(s_c_si_, &kp LS(S) &kp E &kp R &kp V &kp I &kp C &kp E &kp S &kp SPC)
345 | MACRO(c_to, &kp T &kp O &kp W &kp N &kp SPC)
346 | MACRO(s_c_to, &kp LS(T) &kp O &kp W &kp N &kp SPC)
347 | MACRO(c_to_, &kp T &kp O &kp W &kp N &kp S &kp SPC)
348 | MACRO(s_c_to_, &kp LS(T) &kp O &kp W &kp N &kp S &kp SPC)
349 | MACRO(c_gt, &kp G &kp O &kp V &kp E &kp R &kp N &kp M &kp E &kp N &kp T &kp SPC)
350 | MACRO(s_c_gt, &kp LS(G) &kp O &kp V &kp E &kp R &kp N &kp M &kp E &kp N &kp T &kp SPC)
351 | MACRO(c_gt_, &kp G &kp O &kp V &kp E &kp R &kp N &kp M &kp E &kp N &kp T &kp S &kp SPC)
352 | MACRO(s_c_gt_, &kp LS(G) &kp O &kp V &kp E &kp R &kp N &kp M &kp E &kp N &kp T &kp S &kp SPC)
353 | MACRO(c_ke, &kp K &kp E &kp E &kp P &kp SPC)
354 | MACRO(s_c_ke, &kp LS(K) &kp E &kp E &kp P &kp SPC)
355 | MACRO(c_ke_, &kp K &kp E &kp E &kp P &kp S &kp SPC)
356 | MACRO(s_c_ke_, &kp LS(K) &kp E &kp E &kp P &kp S &kp SPC)
357 | MACRO(c_ke__, &kp K &kp E &kp P &kp T &kp SPC)
358 | MACRO(s_c_ke__, &kp LS(K) &kp E &kp P &kp T &kp SPC)
359 | MACRO(c_ke___, &kp K &kp E &kp E &kp P &kp I &kp N &kp G &kp SPC)
360 | MACRO(s_c_ke___, &kp LS(K) &kp E &kp E &kp P &kp I &kp N &kp G &kp SPC)
361 | MACRO(c_fa, &kp F &kp A &kp M &kp I &kp L &kp Y &kp SPC)
362 | MACRO(s_c_fa, &kp LS(F) &kp A &kp M &kp I &kp L &kp Y &kp SPC)
363 | MACRO(c_fa_, &kp F &kp A &kp M &kp I &kp L &kp I &kp E &kp S &kp SPC)
364 | MACRO(s_c_fa_, &kp LS(F) &kp A &kp M &kp I &kp L &kp I &kp E &kp S &kp SPC)
365 | MACRO(c_sti, &kp S &kp T &kp I &kp L &kp L &kp SPC)
366 | MACRO(s_c_sti, &kp LS(S) &kp T &kp I &kp L &kp L &kp SPC)
367 | MACRO(c_sr, &kp S &kp E &kp V &kp E &kp R &kp A &kp L &kp SPC)
368 | MACRO(s_c_sr, &kp LS(S) &kp E &kp V &kp E &kp R &kp A &kp L &kp SPC)
369 | MACRO(c_fe, &kp F &kp E &kp E &kp L &kp SPC)
370 | MACRO(s_c_fe, &kp LS(F) &kp E &kp E &kp L &kp SPC)
371 | MACRO(c_fe_, &kp F &kp E &kp E &kp L &kp S &kp SPC)
372 | MACRO(s_c_fe_, &kp LS(F) &kp E &kp E &kp L &kp S &kp SPC)
373 | MACRO(c_fe__, &kp F &kp E &kp L &kp T &kp SPC)
374 | MACRO(s_c_fe__, &kp LS(F) &kp E &kp L &kp T &kp SPC)
375 | MACRO(c_fe___, &kp F &kp E &kp E &kp L &kp I &kp N &kp G &kp SPC)
376 | MACRO(s_c_fe___, &kp LS(F) &kp E &kp E &kp L &kp I &kp N &kp G &kp SPC)
377 | MACRO(c_sat, &kp S &kp T &kp A &kp R &kp T &kp SPC)
378 | MACRO(s_c_sat, &kp LS(S) &kp T &kp A &kp R &kp T &kp SPC)
379 | MACRO(c_sat_, &kp S &kp T &kp A &kp R &kp T &kp S &kp SPC)
380 | MACRO(s_c_sat_, &kp LS(S) &kp T &kp A &kp R &kp T &kp S &kp SPC)
381 | MACRO(c_sat__, &kp S &kp T &kp A &kp R &kp T &kp E &kp D &kp SPC)
382 | MACRO(s_c_sat__, &kp LS(S) &kp T &kp A &kp R &kp T &kp E &kp D &kp SPC)
383 | MACRO(c_sat___, &kp S &kp T &kp A &kp R &kp T &kp I &kp N &kp G &kp SPC)
384 | MACRO(s_c_sat___, &kp LS(S) &kp T &kp A &kp R &kp T &kp I &kp N &kp G &kp SPC)
385 | MACRO(c_cs, &kp C &kp O &kp N &kp S &kp I &kp D &kp E &kp R &kp SPC)
386 | MACRO(s_c_cs, &kp LS(C) &kp O &kp N &kp S &kp I &kp D &kp E &kp R &kp SPC)
387 | MACRO(c_cs_, &kp C &kp O &kp N &kp S &kp I &kp D &kp E &kp R &kp S &kp SPC)
388 | MACRO(s_c_cs_, &kp LS(C) &kp O &kp N &kp S &kp I &kp D &kp E &kp R &kp S &kp SPC)
389 | MACRO(c_cs__, &kp C &kp O &kp N &kp S &kp I &kp D &kp E &kp R &kp E &kp D &kp SPC)
390 | MACRO(s_c_cs__, &kp LS(C) &kp O &kp N &kp S &kp I &kp D &kp E &kp R &kp E &kp D &kp SPC)
391 | MACRO(c_cs___, &kp C &kp O &kp N &kp S &kp I &kp D &kp E &kp R &kp I &kp N &kp G &kp SPC)
392 | MACRO(s_c_cs___, &kp LS(C) &kp O &kp N &kp S &kp I &kp D &kp E &kp R &kp I &kp N &kp G &kp SPC)
393 | MACRO(c_na, &kp N &kp A &kp M &kp E &kp SPC)
394 | MACRO(s_c_na, &kp LS(N) &kp A &kp M &kp E &kp SPC)
395 | MACRO(c_na_, &kp N &kp A &kp M &kp E &kp S &kp SPC)
396 | MACRO(s_c_na_, &kp LS(N) &kp A &kp M &kp E &kp S &kp SPC)
397 | MACRO(c_ir, &kp I &kp M &kp P &kp O &kp R &kp T &kp A &kp N &kp T &kp SPC)
398 | MACRO(s_c_ir, &kp LS(I) &kp M &kp P &kp O &kp R &kp T &kp A &kp N &kp T &kp SPC)
399 | MACRO(c_pi, &kp P &kp R &kp O &kp V &kp I &kp D &kp E &kp SPC)
400 | MACRO(s_c_pi, &kp LS(P) &kp R &kp O &kp V &kp I &kp D &kp E &kp SPC)
401 | MACRO(c_pi_, &kp P &kp R &kp O &kp V &kp I &kp D &kp E &kp S &kp SPC)
402 | MACRO(s_c_pi_, &kp LS(P) &kp R &kp O &kp V &kp I &kp D &kp E &kp S &kp SPC)
403 | MACRO(c_pi__, &kp P &kp R &kp O &kp V &kp I &kp D &kp E &kp D &kp SPC)
404 | MACRO(s_c_pi__, &kp LS(P) &kp R &kp O &kp V &kp I &kp D &kp E &kp D &kp SPC)
405 | MACRO(c_pi___, &kp P &kp R &kp O &kp V &kp I &kp D &kp I &kp N &kp G &kp SPC)
406 | MACRO(s_c_pi___, &kp LS(P) &kp R &kp O &kp V &kp I &kp D &kp I &kp N &kp G &kp SPC)
407 | MACRO(c_sp, &kp S &kp T &kp E &kp P &kp SPC)
408 | MACRO(s_c_sp, &kp LS(S) &kp T &kp E &kp P &kp SPC)
409 | MACRO(c_sp_, &kp S &kp T &kp E &kp P &kp S &kp SPC)
410 | MACRO(s_c_sp_, &kp LS(S) &kp T &kp E &kp P &kp S &kp SPC)
411 | MACRO(c_wd, &kp W &kp O &kp R &kp L &kp D &kp SPC)
412 | MACRO(s_c_wd, &kp LS(W) &kp O &kp R &kp L &kp D &kp SPC)
413 | MACRO(c_wd_, &kp W &kp O &kp R &kp L &kp D &kp S &kp SPC)
414 | MACRO(s_c_wd_, &kp LS(W) &kp O &kp R &kp L &kp D &kp S &kp SPC)
415 | MACRO(c_lc, &kp L &kp O &kp C &kp A &kp L &kp SPC)
416 | MACRO(s_c_lc, &kp LS(L) &kp O &kp C &kp A &kp L &kp SPC)
417 | MACRO(c_ld, &kp L &kp E &kp A &kp D &kp SPC)
418 | MACRO(s_c_ld, &kp LS(L) &kp E &kp A &kp D &kp SPC)
419 | MACRO(c_ld_, &kp L &kp E &kp A &kp D &kp S &kp SPC)
420 | MACRO(s_c_ld_, &kp LS(L) &kp E &kp A &kp D &kp S &kp SPC)
421 | MACRO(c_ld__, &kp L &kp E &kp D &kp SPC)
422 | MACRO(s_c_ld__, &kp LS(L) &kp E &kp D &kp SPC)
423 | MACRO(c_ld___, &kp L &kp E &kp A &kp D &kp I &kp N &kp G &kp SPC)
424 | MACRO(s_c_ld___, &kp LS(L) &kp E &kp A &kp D &kp I &kp N &kp G &kp SPC)
425 |
--------------------------------------------------------------------------------
/qmk-chorded.py:
--------------------------------------------------------------------------------
1 | import csv
2 | import utils
3 |
4 | # Limit how many rows to process since microcontrollers such as pro micro have quite limited memory
5 | # You'll need to lower this if you get memory errors when compiling
6 | limit = 0
7 | # Needs to match what you have defined in your keymap. If you have other mod tap with alphas you need to map each to a letter. If you aren't using mod tap you can remove the alpha mappings here and restore `KC_SCLN` for semicolon.
8 | key_map = {
9 | "C": "KC_SFT_C",
10 | "I": "KC_ALT_I",
11 | "E": "KC_GUI_E",
12 | "A": "KC_CTL_A",
13 | "H": "KC_CTL_H",
14 | "T": "KC_GUI_T",
15 | "S": "KC_ALT_S",
16 | "N": "KC_SFT_N",
17 | "J": "KC_CAG_J",
18 | "M": "KC_CAG_M",
19 | ";": "KC_SCLN",
20 | ",": "KC_COMMA",
21 | ".": "KC_DOT",
22 | "'": "KC_QUOT",
23 | "-": "KC_MINUS",
24 | "←": "KC_BSPC",
25 | }
26 |
27 | seen = {}
28 | output = ""
29 | line_no = 0
30 |
31 | trigger_keys = ["KC_COMBO"]
32 | shifted_keys = ["KC_COMBO_SFT"]
33 | alt_keys = [["KC_COMBO_ALT1"], ["KC_COMBO_ALT2"], ["KC_COMBO_ALT1", "KC_COMBO_ALT2"]]
34 |
35 |
36 | def translate_keys(abbr):
37 | result = trigger_keys.copy()
38 | for k in abbr:
39 | k = k.upper()
40 | if k in key_map:
41 | result.append(key_map[k])
42 | else:
43 | result.append(f"KC_{k}")
44 | return result
45 |
46 |
47 | print("Processing abbr.tsv")
48 | with open("abbr.tsv") as file:
49 | file = csv.reader(file, delimiter="\t")
50 | for p in [";", ",", "."]:
51 | name = f"c_{key_map[p]}"
52 | keys = translate_keys(p)
53 | output += f'SUBS({name}, SS_TAP(X_BSPC)"{p} ", {", ".join(keys)})\n'
54 |
55 | for line in file:
56 | line_no += 1
57 | if limit != 0 and line_no > limit:
58 | print(f"Stopping at line {limit} due to limit setting")
59 | break
60 |
61 | if line[1]:
62 | abbr = line.pop(1)
63 | if abbr in seen:
64 | raise Exception(
65 | f'Error line {line_no}: already used trigger "{abbr}" for word "{seen[abbr]}"'
66 | )
67 |
68 | combinations = utils.find_all_combinations(abbr)
69 | for a in combinations:
70 | seen[a] = line[0]
71 |
72 | keys = translate_keys(abbr)
73 | for i, word in enumerate(line):
74 | if not word:
75 | continue
76 | alt = []
77 | if i != 0:
78 | alt = alt_keys[i - 1]
79 | name = f"c_{abbr}{i}".replace("'", "_").replace("-", "_")
80 |
81 | output += f'SUBS({name}, "{word} ", {", ".join(keys + alt)})\n'
82 | output += f'SUBS({name}s, "{word.capitalize()} ", {", ".join(keys + alt + shifted_keys)})\n'
83 |
84 | print("writing abbr.def")
85 | with open("abbr.def", "w") as file:
86 | file.write(output)
87 | print("done")
88 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | Pattern==3.6
2 |
--------------------------------------------------------------------------------
/runall.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -euo pipefail
3 |
4 | declare -a scripts=(
5 | abbrgen
6 | training
7 | qmk-chorded
8 | # zmk-chorded
9 | kanata-chorded
10 | # espanso-text-expansion
11 | )
12 | for script in "${scripts[@]}"; do
13 | echo "Running ${script}.py"
14 | python ${script}.py
15 | done
16 |
17 | # cp abbr.yml ../nixconfig/home/espanso/config/match/abbr.yml
18 | # cp abbr.def ../qmk_firmware/keyboards/mushi/keymaps/engram
19 | # cp abbr.def ../qmk_firmware/keyboards/tamatama/keymaps/engram
20 | cp abbr.def ../qmk_firmware/keyboards/tenshi/keymaps/engram
21 | # cp combos.dtsi ../zmk-sweep/config
22 | # cp macros.dtsi ../zmk-sweep/config
23 |
--------------------------------------------------------------------------------
/trained.txt:
--------------------------------------------------------------------------------
1 | the and you have that your can but will they
2 | this which say make their also use when other take
3 | would get good people know year its more some there
4 | then where think come what find these could first very
5 |
--------------------------------------------------------------------------------
/training.py:
--------------------------------------------------------------------------------
1 | # Generates training.txt for the user to practice abbrs
2 | import csv
3 |
4 | expand_trigger = ",;"
5 | alt_suffix_1 = "q"
6 | alt_suffix_2 = "j"
7 | seen = {}
8 | output = "matches:\n"
9 | line_no = 0
10 |
11 | print("Processing abbr.tsv")
12 | with open("abbr.tsv") as abbr_file:
13 | abbr_file = csv.reader(abbr_file, delimiter="\t")
14 | index = 0
15 | words = ""
16 | abbrs = ""
17 | print("Writing training.txt")
18 | with open("training.txt", "w") as training_file:
19 | for line in abbr_file:
20 | word = line[0]
21 | abbr = line[1]
22 | if not abbr:
23 | continue
24 | words += f"{word} "
25 | abbrs += abbr + (" " * (len(word) + 1 - len(abbr)))
26 | index += 1
27 | if index % 10 == 0:
28 | training_file.write(words.rstrip())
29 | training_file.write("\n")
30 | training_file.write(abbrs.rstrip())
31 | training_file.write("\n")
32 | words = ""
33 | abbrs = ""
34 | print("Done")
35 |
--------------------------------------------------------------------------------
/training.txt:
--------------------------------------------------------------------------------
1 | the and you have that your can but will they
2 | t a y h th yr c b w te
3 | this which say make their also use when other take
4 | ti wh s m tr as u we o ta
5 | would get good people know year its more some there
6 | wo g gd p k ya i me se the
7 | then where think come what find these could first very
8 | tn whe tk ce wa f ts co ft v
9 | include only day just give such many should well area
10 | ie on d j ge sh ma so wl ae
11 | need most city image look high life while because thing
12 | n ms ct ia l hi le wi ba thi
13 | become however part great work large small country even study
14 | bo he pa ga wk la sl cn e sd
15 | follow system different leave place help run child number much
16 | fo ste de lea pe hp r ch ne mh
17 | call tell water service town government keep family still several
18 | ca tl wae si to gt ke fa sti sr
19 | feel start consider name important provide step world local lead
20 | fe sat cs na ir pi sp wd lc ld
21 | after home before issue group every write might result information
22 | ar ho br iu gr er wie mi ru in
23 | hold state process bring serve level another minute member about
24 | hd sae pr bn ser lv ah mn mr ao
25 | method point hand woman hour never must allow increase live
26 | mo pt hn woa hu nr mu alo ic li
27 | play party something always datum second base line create next
28 | py pat sn als da sec bs ln cr nx
29 | order problem little really understand train build often believe offer
30 | or po lte rea ue tai bd otn bl ofr
31 | death person example power long continue require house free both
32 | dah pes ex per lo cu rei hse fr bh
33 | choose region friend again speak effect receive early community business
34 | che ren fi ain sk ect rec ey cm bu
35 | station young possible research change school those turn although value
36 | sai yn pie rsa cha sch ths tu ath va
37 | involve month like grow company activity develop report night kill
38 | io mnh lk gw cy act do ret nht ki
39 | political available reach stand major election event type game energy
40 | pc aie rac san mj eti ev ty gm eny
41 | right health public condition learn development money least yourself cause
42 | rit hea pu cd lan dn my lat ys cae
43 | since position return remain appear close candidate paper control light
44 | sie pst rtn rai ape cle cai par cnt lit
45 | boat himself experience language history idea support interest together describe
46 | bt hie ein lu hy id su int toh des
47 | material especially island happen apply accord locate though until today
48 | mae eci isn han aly aco lca thu un toa
49 | body animal therefore reduce source relate course reason social century
50 | by ail thf reu src rat cos ran sca cen
51 | project field cover fact interview improve village campaign office action
52 | pet fie cv fc iv ime vae can oic atn
53 | current response human almost goal represent market carry force view
54 | crt rsn hma aos gl rst mk cay fre vw
55 | performance expect perform various full factor publish network population marry
56 | pm ext pf vo fu fat pih nk pai mar
57 | usually obtain period kind property already strong analysis determine product
58 | uy oai pri kd prt aed stn ays dei pct
59 | leader father media visit center anything music form probably court
60 | lad fh mia vt cnr ahi msi fm pb cot
61 | spend enter nothing space remove suggest similar Figure park risk
62 | sen ent nhi spa rem sg sir fir pk rk
63 | addition website white produce piece international account military common amount
64 | adi wb whi pce pic ito aon mir con amn
65 | mother national approach daughter present surface airport affect application enough
66 | mhe ntl aoh dhe prs sue aro aet aict enh
67 | certain patient article compare remember option decision policy identify former
68 | cti pit atie cma rmb oin dis poi idn fme
69 | student police girl video difference flight someone connect restaurant price
70 | sut poc gi vd den fih sme cnet reta prc
71 | focus prepare environment sometimes break popular contain operate program route
72 | foc prea evt sot bra poa cni ort pg rut
73 | design relationship solution claim table short specie propose church feature
74 | dsn rin soi cli tab sho sci pos chu fea
75 | watch function distance capital class share temperature effort whole security
76 | wc fn dsa ctl cls sha teu eft who sct
77 | previous actually ground production organization decide structure arrive technology join
78 | pis aty gn pot ori dec suc aiv tch ji
79 | occur summer record drive travel specific moment black release president
80 | ou sur rco dve tav seci men bla reas pset
81 | location everything brother associate difficult instead prevent address range situation
82 | lin evh bth aste du ista pret ades rag sui
83 | significant industry morning establish attention beach select exist avoid resource
84 | snc iut min etah aen bah sle exs aod rso
85 | disease official training traditional particular likely color natural statement knowledge
86 | diea oil trai tain pac ly col ntu sam kne
87 | degree border voice opportunity regard culture single simple necessary explain
88 | deg bor vie oy reg cut sil smp nay eli
89 | indicate treatment achieve nature direction observe impact itself announce growth
90 | idc tean ahv nue dcn obs imc itf ance gh
91 | computer window without match American protect stage tourist style themselves
92 | cue wid wu mch aeri pro sag tris stl thv
93 | private general education resident content story board message chance strategy
94 | pate gea eui rest cont sty boa msae chn sey
95 | practice special around province below recently currently authority season economic
96 | paie seia and pice blo rey cey ahy son ecm
97 | multiple active environmental vehicle choice ticket generally conduct directly personal
98 | mue acv enl vh chi tke gna cnu dy pesa
99 | technique mention mountain beautiful challenge traffic device operation management character
100 | tehi mio moa bf chae trf dvi orn mane chat
101 | finally purpose section pressure evidence famous investigate climate easily promote
102 | fia pue seti psu evn fao ivt cate eay pme
103 | algorithm front influence connection introduction detail particularly further discuss individual
104 | aith fnt iun ceti irc del ptu fhe dsc inv
105 | movement destination warning nuclear introduce behavior appoint perhaps simply machine
106 | mon dso wai near iuc bv aoit pha sly mhi
107 | subject original variety player concern complete citizen investigation king check
108 | sj onl vy pay cner com citn inea kg ck
109 | positive expression final sound potential communication element effective attempt maintain
110 | pite ersi fna sun ptia cnat elnt ecv amp main
111 | express photo ability measure district surround presence visitor painting myself
112 | exr pht ailt msr disc suo psc vto pag mye
113 | happy pattern discover physical finish everyone manage confirm parameter central
114 | hpy patr dio phs fnh evy mag cnm pmr cera
115 | component round picture north mainly Spanish contribute recognize future marriage
116 | cmne run piu noh may sih cru rcie fut maie
117 | signal mostly foreign object green explore daily officer modern governor
118 | snl mos fen obt gen exl day ofi mrn gv
119 | urban minister society customer encourage meeting length track supply infection
120 | urb mns scet csm enur mein leg trk sul inet
121 | discussion blood serious reaction demonstrate global skill previously target museum
122 | diu bod seiu reti don gla ski pey tag mus
123 | collection evaluate reference crime highly branch mechanism facility complex consist
124 | cln ealt rfn crm hig ban mhs fy cx csit
125 | regular successful platform couple ready maybe measurement forest drink interesting
126 | rega suce paf cou ray mb mear fot dik ints
127 | garden concentration respond soldier Russian advantage responsible heavy generate weight
128 | gad ceai resn sol rui avn rnie hey get wgh
129 | worker concept phone completely transport nearly guide incident newspaper distribution
130 | wke cept phe cty tras nry gie ince nesa dsu
131 | relation independent northern purchase recommend combine council additional numerous European
132 | ratn inde nthe pch rom cmie cul aton nuo eurp
133 | background downtown hospital interaction victim primary economy yesterday document apartment
134 | bad dow hoi inra vct pim ecny yet due arten
135 | benefit professional respect taxis conference director federal replace south analyze
136 | bnt psia rect tx cfe dco fra rpac suh anle
137 | passenger weather memory total collect importance protein bottom capacity construction
138 | pasr wah mry tol clet irac prti bom caty cnst
139 | belong immediately capture requirement approximately southern glass negative generation decade
140 | bon idl catr rent ax shn gls nv gai dca
141 | outcome investment frequency presidential declare fully instance participate penalty relatively
142 | out ines frc psta dcae fuy insa patc pty rty
143 | ferry respectively characteristic violence resolution majority injury chief unknown evening
144 | fey rsy chte vic rstn maj ijr chf uow evni
145 | financial anyone critical Chinese journalist overall refuse appropriate audience employ
146 | fac ayo crit chie ja ova rfu arot ainc ely
147 | objective useful version handle estimate suppose administration healthy protest reflect
148 | oiv uel von hnd esim supe anst hty prts reft
149 | opposition pretty university principle parking significantly furthermore husband digital journey
150 | osit pry uv prie pki scat fho hsd dig jr
151 | forward chemical contact resistance failure conflict birth basis decrease interested
152 | fora chia coat rsia fue cft brt bas dcas intr
153 | survive literature calculate comfortable excellent novel extend display sentence aircraft
154 | sure ltu calt cale exc nvl exn dsl sent aift
155 | county French efficiency expensive request sight television improvement possibly spring
156 | cny fnc efic exv reut sgh tvn ivet psy sig
157 | responsibility destroy consumption implement landscape clinical mission employee perspective typically
158 | rsni dey cnsi ilet lase clia misn empy psei tyl
159 | budget thousand religion variable strength selection dollar association prefer agreement
160 | but thsa rig val steh secn dol asci pef aget
161 | medical extremely politics festival cluster theory widely competition coach institution
162 | meca exm pits feta cstr toy wy coti coh iuo
163 | cultural software fruit reduction eventually thank organize neighborhood murder combination
164 | cutr sota fui ruo evta thk orai neih mur coai
165 | initial slowly otherwise detection regional finger historical exactly expand procedure
166 | inal soy othi deci rona fin hisa exa exd pur
167 | Australian difficulty crowd certainly intervention equipment stick specifically religious context
168 | asrn dcu cow cry into euit stk seca rgs ctx
169 | regulation perfect deliver football Italian category preserve assessment reporter commercial
170 | rgt pft dlv fba itln coy pser asent rpot cora
171 | enhance publication forget unless simulation standard brain possibility German examine
172 | enha puc fg unl siao sand brn pbt grn exan
173 | English gather settlement comparison appearance execute transfer protection worry whatever
174 | eish gah slet cars arnc ecut traf ptci woy whae
175 | battle surgery originally friendly spatial lawyer cycle accident license grant
176 | btl sge oina fry satl law cyl aden lies gnt
177 | suddenly restore researcher pronounce convert advance manager experiment variation frequently
178 | sny rsto resc pou cnv adv manr erim vati fty
179 | mouth volume strange agricultural farmer percent Israeli British inform billion
180 | moh vle stg agit fam perc iael bsh ifm bln
181 | height formation transportation clothes Click contribution integrate conversation freedom wonder
182 | heg fon troi cths cik cntr igt cnsa frm wde
183 | architecture cloud channel session tourism biological industrial threaten sustainable dedicate
184 | ahie cld chan sion tuis bola idsa than stb dica
185 | terminal fashion judge average participant slightly weekend schedule install stock
186 | tnal fah jd avg paic shy wkd sche isal sck
187 | possession attraction density confidence powerful contractor essential comment emergency characterize
188 | posi acon dsy cfi prf cotr estia comn emg chti
189 | household intelligence civil profile exposure danger dangerous exercise highlight button
190 | hue ign cvl pfi exsr dng dnu excs hgt bun
191 | breakfast plastic clearly expert inspire justice politician package observation library
192 | brs pasc ceay exp ispr jt pota pke osra lby
193 | arrange youth consequence largely alternative exchange compose somewhat trouble careful
194 | ange yoh cons laey aive exh cmse seha tule caef
195 | compound arrival historic predict magazine evaluation strongly portrait commonly accuracy
196 | cmu aivl hist prct mgi evu ston prai cmy acry
197 | properly consumer housing voltage anywhere reality adjust shopping subsequently fourth
198 | poy cnsr hui vlt ayhe reay ajt shin suet fuh
199 | leadership territory award Japanese composition eliminate expedition prisoner carefully nearby
200 | lead tery awd jn cost einat extn pior cuy nby
201 | suitable afternoon accompany injure alcohol emission creation conclude portion ingredient
202 | sitl aftn acmn inj acoh emsn crin cnde poti iget
203 | description album occupy constant beneficial atmosphere impossible distribute satisfy pathway
204 | desi abm ouy cosa bnf atoh iosl dsb saty path
205 | boundary residential construct CHAPTER hundred biography maximum celebrate indicator valley
206 | bay resta cstu chap hun boh mx cerat inda vay
207 | supporter closely experimental illegal monitor assistance obviously circumstance entirely scientific
208 | surt csy exta iega mnir astce oul cirs enty sceti
209 | clothing matrix struck neither yellow progress accessible technical prominent mistake
210 | cthn max srk nith yew pge acsl tehia pom mke
211 | contract framework operator professor thick efficient expansion fairly innovation typical
212 | conr fk opra pof tik efit exas fay inva ticl
213 | disorder doubt coverage infrastructure afterwards fight apparently attribute imagine sexual
214 | diso dou cov ifae afer fgh aety atrie iagn sx
215 | brand transmission particle maintenance scientist domestic reportedly primarily promise stable
216 | bnd trasi pace maic senti desc roy pima pmie sbl
217 | knife instrument effectively regime nomination extensive criterion classification storage command
218 | kie ium ectv rgm noma exts crio csio sage cand
219 | highway correlation long-term limitation beauty shoulder creature sufficient sustainability diverse
220 | hiwa ceati lgt ltao bty shde crue suen suy dive
221 |
--------------------------------------------------------------------------------
/utils.py:
--------------------------------------------------------------------------------
1 | def find_combinations(s, prefix="", index=0):
2 | """
3 | Recursively find every combination of letters in a string from left to right
4 | starting with the first character.
5 |
6 | Args:
7 | - s: The input string.
8 | - prefix: The current combination being built.
9 | - index: The current index in the string.
10 |
11 | Returns:
12 | - result: A list containing all combinations starting with the first character
13 | and excluding the empty string, sorted by shortest string first.
14 | """
15 | result = []
16 | if index == len(s):
17 | if prefix:
18 | result.append(prefix)
19 | return result
20 |
21 | # Include the current character only if it's the first character or part of a previous combination
22 | if index == 0 or prefix:
23 | result.extend(find_combinations(s, prefix + s[index], index + 1))
24 |
25 | # Exclude the current character
26 | result.extend(find_combinations(s, prefix, index + 1))
27 |
28 | return result
29 |
30 |
31 | def find_all_combinations(string):
32 | if len(string) == 1:
33 | return [string]
34 | else:
35 | combos = []
36 | for i, char in enumerate(string):
37 | remaining_chars = string[:i] + string[i + 1 :]
38 | sub_combos = find_all_combinations(remaining_chars)
39 | for sub_combo in sub_combos:
40 | combos.append(char + sub_combo)
41 | return combos
42 |
--------------------------------------------------------------------------------
/words.ods:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlip/abbrgen/49cf3802fac0cd1520b30820b426e57d2bd9532f/words.ods
--------------------------------------------------------------------------------
/words.tsv:
--------------------------------------------------------------------------------
1 | the DET
2 | be AUX
3 | and CCONJ
4 | a DET
5 | you PRON
6 | it PRON
7 | have VERB
8 | I PRON
9 | he PRON
10 | that SCONJ
11 | or CCONJ
12 | your PRON
13 | that PRON
14 | his PRON
15 | an DET
16 | can AUX
17 | but CCONJ
18 | will AUX
19 | they PRON
20 | this DET
21 | do AUX
22 | which PRON
23 | if SCONJ
24 | we PRON
25 | be VERB
26 | say VERB
27 | make VERB
28 | their PRON
29 | also ADV
30 | use VERB
31 | when SCONJ
32 | as SCONJ
33 | her PRON
34 | time NOUN
35 | do VERB
36 | who PRON
37 | she PRON
38 | other ADJ
39 | take VERB
40 | would AUX
41 | get VERB
42 | go VERB
43 | so ADV
44 | them PRON
45 | this PRON
46 | good ADJ
47 | people NOUN
48 | see VERB
49 | know VERB
50 | year NOUN
51 | my PRON
52 | its PRON
53 | him PRON
54 | more ADV
55 | all PRON
56 | some DET
57 | there PRON
58 | then ADV
59 | where SCONJ
60 | think VERB
61 | come VERB
62 | what PRON
63 | may AUX
64 | find VERB
65 | these DET
66 | how SCONJ
67 | no DET
68 | could AUX
69 | our PRON
70 | first ADJ
71 | very ADV
72 | include VERB
73 | only ADV
74 | day NOUN
75 | way NOUN
76 | just ADV
77 | as ADV
78 | give VERB
79 | such ADJ
80 | me PRON
81 | many ADJ
82 | should AUX
83 | any DET
84 | that DET
85 | want VERB
86 | well ADV
87 | area NOUN
88 | need VERB
89 | most ADV
90 | city NOUN
91 | all DET
92 | image NOUN
93 | look VERB
94 | high ADJ
95 | There PRON
96 | now ADV
97 | new ADJ
98 | man NOUN
99 | life NOUN
100 | while SCONJ
101 | because SCONJ
102 | thing NOUN
103 | of SCONJ
104 | become VERB
105 | however ADV
106 | part NOUN
107 | great ADJ
108 | work VERB
109 | show VERB
110 | work NOUN
111 | large ADJ
112 | small ADJ
113 | country NOUN
114 | by SCONJ
115 | even ADV
116 | study NOUN
117 | follow VERB
118 | in SCONJ
119 | system NOUN
120 | different ADJ
121 | leave VERB
122 | place NOUN
123 | try VERB
124 | help VERB
125 | run VERB
126 | more ADJ
127 | child NOUN
128 | same ADJ
129 | number NOUN
130 | old ADJ
131 | much ADV
132 | call VERB
133 | tell VERB
134 | water NOUN
135 | service NOUN
136 | town NOUN
137 | government NOUN
138 | keep VERB
139 | here ADV
140 | family NOUN
141 | still ADV
142 | for SCONJ
143 | several ADJ
144 | feel VERB
145 | start VERB
146 | ask VERB
147 | own ADJ
148 | back ADV
149 | consider VERB
150 | name NOUN
151 | there ADV
152 | important ADJ
153 | provide VERB
154 | each DET
155 | step NOUN
156 | world NOUN
157 | What PRON
158 | local ADJ
159 | lead VERB
160 | after SCONJ
161 | home NOUN
162 | before SCONJ
163 | issue NOUN
164 | group NOUN
165 | every DET
166 | write VERB
167 | most ADJ
168 | last ADJ
169 | might AUX
170 | few ADJ
171 | result NOUN
172 | information NOUN
173 | hold VERB
174 | state NOUN
175 | put VERB
176 | process NOUN
177 | food NOUN
178 | bring VERB
179 | serve VERB
180 | case NOUN
181 | level NOUN
182 | another DET
183 | minute NOUN
184 | member NOUN
185 | side NOUN
186 | us PRON
187 | about ADV
188 | method NOUN
189 | book NOUN
190 | point NOUN
191 | hand NOUN
192 | too ADV
193 | low ADJ
194 | car NOUN
195 | bus NOUN
196 | woman NOUN
197 | die VERB
198 | hour NOUN
199 | never ADV
200 | must AUX
201 | allow VERB
202 | increase VERB
203 | live VERB
204 | model NOUN
205 | far ADV
206 | why SCONJ
207 | play VERB
208 | party NOUN
209 | lot NOUN
210 | something NOUN
211 | always ADV
212 | some PRON
213 | datum NOUN
214 | due ADJ
215 | second ADJ
216 | add VERB
217 | mean VERB
218 | base VERB
219 | line NOUN
220 | create VERB
221 | next ADJ
222 | order NOUN
223 | main ADJ
224 | late ADV
225 | problem NOUN
226 | little ADJ
227 | really ADV
228 | understand VERB
229 | train NOUN
230 | build VERB
231 | often ADV
232 | believe VERB
233 | end NOUN
234 | offer VERB
235 | dog NOUN
236 | death NOUN
237 | person NOUN
238 | example NOUN
239 | big ADJ
240 | other NOUN
241 | power NOUN
242 | let VERB
243 | long ADJ
244 | continue VERB
245 | site NOUN
246 | long ADV
247 | require VERB
248 | house NOUN
249 | read VERB
250 | free ADJ
251 | both DET
252 | choose VERB
253 | begin VERB
254 | region NOUN
255 | set VERB
256 | seem VERB
257 | friend NOUN
258 | again ADV
259 | speak VERB
260 | effect NOUN
261 | receive VERB
262 | early ADJ
263 | community NOUN
264 | move VERB
265 | business NOUN
266 | station NOUN
267 | young ADJ
268 | possible ADJ
269 | research NOUN
270 | eye NOUN
271 | change NOUN
272 | school NOUN
273 | those PRON
274 | turn VERB
275 | although SCONJ
276 | value NOUN
277 | involve VERB
278 | month NOUN
279 | road NOUN
280 | talk VERB
281 | use NOUN
282 | pay VERB
283 | those DET
284 | like VERB
285 | grow VERB
286 | company NOUN
287 | activity NOUN
288 | develop VERB
289 | report VERB
290 | change VERB
291 | night NOUN
292 | kill VERB
293 | head NOUN
294 | political ADJ
295 | available ADJ
296 | able ADJ
297 | reach VERB
298 | stand VERB
299 | team NOUN
300 | major ADJ
301 | election NOUN
302 | event NOUN
303 | win VERB
304 | type NOUN
305 | game NOUN
306 | energy NOUN
307 | right NOUN
308 | son NOUN
309 | health NOUN
310 | public ADJ
311 | buy VERB
312 | condition NOUN
313 | pass VERB
314 | learn VERB
315 | development NOUN
316 | stop VERB
317 | room NOUN
318 | money NOUN
319 | week NOUN
320 | least ADJ
321 | lose VERB
322 | yourself PRON
323 | cause VERB
324 | since SCONJ
325 | position NOUN
326 | return VERB
327 | word NOUN
328 | remain VERB
329 | appear VERB
330 | close ADJ
331 | walk VERB
332 | easy ADJ
333 | cell NOUN
334 | candidate NOUN
335 | paper NOUN
336 | control NOUN
337 | question NOUN
338 | report NOUN
339 | so SCONJ
340 | light NOUN
341 | boat NOUN
342 | himself PRON
343 | experience NOUN
344 | language NOUN
345 | history NOUN
346 | ever ADV
347 | idea NOUN
348 | support VERB
349 | interest NOUN
350 | together ADV
351 | law NOUN
352 | describe VERB
353 | whether SCONJ
354 | material NOUN
355 | especially ADV
356 | term NOUN
357 | island NOUN
358 | happen VERB
359 | plant NOUN
360 | apply VERB
361 | once ADV
362 | accord SCONJ
363 | less ADV
364 | locate VERB
365 | role NOUN
366 | though SCONJ
367 | land NOUN
368 | first ADV
369 | meet VERB
370 | until SCONJ
371 | send VERB
372 | today NOUN
373 | cut VERB
374 | body NOUN
375 | animal NOUN
376 | therefore ADV
377 | reduce VERB
378 | source NOUN
379 | relate VERB
380 | course NOUN
381 | reason NOUN
382 | social ADJ
383 | century NOUN
384 | project NOUN
385 | field NOUN
386 | hear VERB
387 | cover VERB
388 | fact NOUN
389 | interview NOUN
390 | improve VERB
391 | village NOUN
392 | eat VERB
393 | air NOUN
394 | campaign NOUN
395 | building NOUN
396 | office NOUN
397 | action NOUN
398 | current ADJ
399 | open ADJ
400 | response NOUN
401 | rather ADV
402 | human ADJ
403 | almost ADV
404 | goal NOUN
405 | represent VERB
406 | market NOUN
407 | carry VERB
408 | away ADV
409 | thus ADV
410 | force NOUN
411 | late ADJ
412 | view NOUN
413 | bear VERB
414 | sit VERB
415 | performance NOUN
416 | expect VERB
417 | both CCONJ
418 | perform VERB
419 | various ADJ
420 | full ADJ
421 | factor NOUN
422 | publish VERB
423 | bad ADJ
424 | cost NOUN
425 | network NOUN
426 | population NOUN
427 | yet ADV
428 | marry VERB
429 | usually ADV
430 | obtain VERB
431 | & CCONJ
432 | period NOUN
433 | kind NOUN
434 | property NOUN
435 | rate NOUN
436 | already ADV
437 | strong ADJ
438 | analysis NOUN
439 | face NOUN
440 | determine VERB
441 | product NOUN
442 | leader NOUN
443 | art NOUN
444 | support NOUN
445 | quality NOUN
446 | father NOUN
447 | media NOUN
448 | visit VERB
449 | center NOUN
450 | at ADV
451 | anything NOUN
452 | music NOUN
453 | form NOUN
454 | probably ADV
455 | court NOUN
456 | set NOUN
457 | spend VERB
458 | attack NOUN
459 | enter VERB
460 | nothing NOUN
461 | job NOUN
462 | only ADJ
463 | space NOUN
464 | remove VERB
465 | war NOUN
466 | suggest VERB
467 | similar ADJ
468 | Figure NOUN
469 | age NOUN
470 | park NOUN
471 | sure ADJ
472 | risk NOUN
473 | addition NOUN
474 | website NOUN
475 | white ADJ
476 | produce VERB
477 | piece NOUN
478 | name VERB
479 | yes INTJ
480 | international ADJ
481 | street NOUN
482 | account NOUN
483 | military ADJ
484 | common ADJ
485 | foot NOUN
486 | amount NOUN
487 | over ADV
488 | mother NOUN
489 | national ADJ
490 | tip NOUN
491 | approach NOUN
492 | daughter NOUN
493 | plan NOUN
494 | present VERB
495 | surface NOUN
496 | airport NOUN
497 | affect VERB
498 | application NOUN
499 | enough ADV
500 | certain ADJ
501 | place VERB
502 | patient NOUN
503 | article NOUN
504 | stay VERB
505 | well INTJ
506 | compare VERB
507 | remember VERB
508 | option NOUN
509 | decision NOUN
510 | policy NOUN
511 | right ADJ
512 | identify VERB
513 | km NOUN
514 | former ADJ
515 | right ADV
516 | student NOUN
517 | form VERB
518 | police NOUN
519 | girl NOUN
520 | video NOUN
521 | difference NOUN
522 | flight NOUN
523 | soon ADV
524 | fall VERB
525 | someone NOUN
526 | mind NOUN
527 | quite ADV
528 | real ADJ
529 | top NOUN
530 | connect VERB
531 | restaurant NOUN
532 | price NOUN
533 | little ADV
534 | focus VERB
535 | prepare VERB
536 | door NOUN
537 | environment NOUN
538 | from SCONJ
539 | sometimes ADV
540 | break VERB
541 | popular ADJ
542 | open VERB
543 | contain VERB
544 | care NOUN
545 | operate VERB
546 | ride NOUN
547 | program NOUN
548 | route NOUN
549 | design NOUN
550 | relationship NOUN
551 | solution NOUN
552 | claim VERB
553 | need NOUN
554 | table NOUN
555 | wait VERB
556 | oil NOUN
557 | short ADJ
558 | study VERB
559 | no INTJ
560 | specie NOUN
561 | propose VERB
562 | raise VERB
563 | church NOUN
564 | feature NOUN
565 | watch VERB
566 | function NOUN
567 | these PRON
568 | bit NOUN
569 | distance NOUN
570 | capital NOUN
571 | class NOUN
572 | state VERB
573 | share VERB
574 | temperature NOUN
575 | effort NOUN
576 | whole ADJ
577 | sell VERB
578 | security NOUN
579 | previous ADJ
580 | actually ADV
581 | wall NOUN
582 | pet NOUN
583 | lie VERB
584 | ground NOUN
585 | production NOUN
586 | film NOUN
587 | organization NOUN
588 | decide VERB
589 | plan VERB
590 | structure NOUN
591 | size NOUN
592 | arrive VERB
593 | technology NOUN
594 | join VERB
595 | end VERB
596 | mile NOUN
597 | on SCONJ
598 | tree NOUN
599 | occur VERB
600 | summer NOUN
601 | record NOUN
602 | half NOUN
603 | drive VERB
604 | travel VERB
605 | wife NOUN
606 | parent NOUN
607 | specific ADJ
608 | career NOUN
609 | hard ADJ
610 | moment NOUN
611 | black ADJ
612 | enjoy VERB
613 | artist NOUN
614 | release VERB
615 | show NOUN
616 | president NOUN
617 | location NOUN
618 | Many ADJ
619 | everything NOUN
620 | brother NOUN
621 | associate VERB
622 | difficult ADJ
623 | instead ADV
624 | prevent VERB
625 | address VERB
626 | range NOUN
627 | situation NOUN
628 | significant ADJ
629 | industry NOUN
630 | morning NOUN
631 | establish VERB
632 | attention NOUN
633 | rule NOUN
634 | beach NOUN
635 | select VERB
636 | exist VERB
637 | avoid VERB
638 | save VERB
639 | resource NOUN
640 | either CCONJ
641 | disease NOUN
642 | official NOUN
643 | note VERB
644 | store NOUN
645 | matter NOUN
646 | such PRON
647 | face VERB
648 | training NOUN
649 | centre NOUN
650 | traditional ADJ
651 | close VERB
652 | particular ADJ
653 | love VERB
654 | miss VERB
655 | ship NOUN
656 | result VERB
657 | likely ADJ
658 | trip NOUN
659 | color NOUN
660 | natural ADJ
661 | statement NOUN
662 | knowledge NOUN
663 | nation NOUN
664 | degree NOUN
665 | shop NOUN
666 | border NOUN
667 | voice NOUN
668 | opportunity NOUN
669 | regard VERB
670 | culture NOUN
671 | single ADJ
672 | simple ADJ
673 | early ADV
674 | letter NOUN
675 | whose PRON
676 | sea NOUN
677 | necessary ADJ
678 | hotel NOUN
679 | explain VERB
680 | sport NOUN
681 | depend VERB
682 | sign NOUN
683 | else ADV
684 | series NOUN
685 | clear ADJ
686 | indicate VERB
687 | boy NOUN
688 | treatment NOUN
689 | test NOUN
690 | author NOUN
691 | achieve VERB
692 | nature NOUN
693 | direction NOUN
694 | observe VERB
695 | third ADJ
696 | impact NOUN
697 | itself PRON
698 | announce VERB
699 | all ADV
700 | both PRON
701 | growth NOUN
702 | computer NOUN
703 | window NOUN
704 | without SCONJ
705 | rest NOUN
706 | match NOUN
707 | once SCONJ
708 | American ADJ
709 | protect VERB
710 | date NOUN
711 | stage NOUN
712 | tourist NOUN
713 | recent ADJ
714 | wear VERB
715 | safe ADJ
716 | style NOUN
717 | themselves PRON
718 | tool NOUN
719 | private ADJ
720 | present ADJ
721 | general ADJ
722 | education NOUN
723 | resident NOUN
724 | content NOUN
725 | list NOUN
726 | plane NOUN
727 | story NOUN
728 | board NOUN
729 | message NOUN
730 | chance NOUN
731 | strategy NOUN
732 | practice NOUN
733 | special ADJ
734 | around ADV
735 | province NOUN
736 | below ADV
737 | recently ADV
738 | currently ADV
739 | authority NOUN
740 | season NOUN
741 | whom PRON
742 | news NOUN
743 | economic ADJ
744 | multiple ADJ
745 | active ADJ
746 | environmental ADJ
747 | page NOUN
748 | vehicle NOUN
749 | choice NOUN
750 | arm NOUN
751 | sense NOUN
752 | poor ADJ
753 | ticket NOUN
754 | safety NOUN
755 | access NOUN
756 | generally ADV
757 | fill VERB
758 | conduct VERB
759 | directly ADV
760 | personal ADJ
761 | loss NOUN
762 | vote NOUN
763 | technique NOUN
764 | draw VERB
765 | mention VERB
766 | river NOUN
767 | mountain NOUN
768 | beautiful ADJ
769 | challenge NOUN
770 | ensure VERB
771 | act VERB
772 | define VERB
773 | traffic NOUN
774 | device NOUN
775 | operation NOUN
776 | heart NOUN
777 | wide ADJ
778 | management NOUN
779 | character NOUN
780 | finally ADV
781 | purpose NOUN
782 | section NOUN
783 | pressure NOUN
784 | evidence NOUN
785 | famous ADJ
786 | investigate VERB
787 | climate NOUN
788 | easily ADV
789 | promote VERB
790 | score VERB
791 | get AUX
792 | speed NOUN
793 | fire NOUN
794 | no ADV
795 | algorithm NOUN
796 | true ADJ
797 | front NOUN
798 | influence NOUN
799 | base NOUN
800 | connection NOUN
801 | introduction NOUN
802 | past ADJ
803 | detail NOUN
804 | particularly ADV
805 | interview VERB
806 | further ADJ
807 | discuss VERB
808 | dead ADJ
809 | individual NOUN
810 | movement NOUN
811 | fail VERB
812 | floor NOUN
813 | destination NOUN
814 | warning NOUN
815 | hope VERB
816 | limit VERB
817 | nuclear ADJ
818 | card NOUN
819 | introduce VERB
820 | drug NOUN
821 | opinion NOUN
822 | winter NOUN
823 | answer VERB
824 | press NOUN
825 | behavior NOUN
826 | appoint VERB
827 | perhaps ADV
828 | one NOUN
829 | sort NOUN
830 | than SCONJ
831 | seat NOUN
832 | simply ADV
833 | key ADJ
834 | machine NOUN
835 | trade NOUN
836 | box NOUN
837 | subject NOUN
838 | original ADJ
839 | variety NOUN
840 | soil NOUN
841 | much ADJ
842 | player NOUN
843 | concern NOUN
844 | star NOUN
845 | accord VERB
846 | agree VERB
847 | alone ADV
848 | charge NOUN
849 | complete VERB
850 | citizen NOUN
851 | investigation NOUN
852 | online ADV
853 | accept VERB
854 | king NOUN
855 | rise VERB
856 | bar NOUN
857 | check VERB
858 | positive ADJ
859 | seek VERB
860 | expression NOUN
861 | flow NOUN
862 | attend VERB
863 | final ADJ
864 | driver NOUN
865 | Go VERB
866 | sound NOUN
867 | potential ADJ
868 | communication NOUN
869 | ago ADV
870 | element NOUN
871 | oh INTJ
872 | band NOUN
873 | effective ADJ
874 | attempt NOUN
875 | gas NOUN
876 | mass NOUN
877 | maintain VERB
878 | design VERB
879 | express VERB
880 | weapon NOUN
881 | photo NOUN
882 | ability NOUN
883 | measure VERB
884 | district NOUN
885 | note NOUN
886 | surround VERB
887 | presence NOUN
888 | visitor NOUN
889 | painting NOUN
890 | myself PRON
891 | happy ADJ
892 | pattern NOUN
893 | tour NOUN
894 | vote VERB
895 | discover VERB
896 | physical ADJ
897 | elect VERB
898 | finish VERB
899 | everyone NOUN
900 | corner NOUN
901 | manage VERB
902 | ball NOUN
903 | troop NOUN
904 | back NOUN
905 | confirm VERB
906 | parameter NOUN
907 | hot ADJ
908 | user NOUN
909 | sample NOUN
910 | central ADJ
911 | official ADJ
912 | entire ADJ
913 | component NOUN
914 | round NOUN
915 | picture NOUN
916 | north ADV
917 | heat NOUN
918 | indeed ADV
919 | mainly ADV
920 | figure NOUN
921 | Spanish ADJ
922 | contribute VERB
923 | recognize VERB
924 | paint NOUN
925 | future NOUN
926 | deep ADJ
927 | spot NOUN
928 | task NOUN
929 | marriage NOUN
930 | signal NOUN
931 | map NOUN
932 | mostly ADV
933 | file NOUN
934 | edge NOUN
935 | foreign ADJ
936 | force VERB
937 | object NOUN
938 | green ADJ
939 | explore VERB
940 | gene NOUN
941 | cold ADJ
942 | daily ADV
943 | what DET
944 | red ADJ
945 | quickly ADV
946 | officer NOUN
947 | measure NOUN
948 | catch VERB
949 | coast NOUN
950 | modern ADJ
951 | governor NOUN
952 | urban ADJ
953 | direct ADJ
954 | minister NOUN
955 | society NOUN
956 | increase NOUN
957 | attempt VERB
958 | customer NOUN
959 | concern VERB
960 | fine ADJ
961 | nice ADJ
962 | encourage VERB
963 | meeting NOUN
964 | staff NOUN
965 | feature VERB
966 | threat NOUN
967 | length NOUN
968 | peace NOUN
969 | track NOUN
970 | supply NOUN
971 | infection NOUN
972 | experience VERB
973 | treat VERB
974 | discussion NOUN
975 | blood NOUN
976 | serious ADJ
977 | reaction NOUN
978 | demonstrate VERB
979 | global ADJ
980 | future ADJ
981 | title NOUN
982 | path NOUN
983 | wish VERB
984 | rock NOUN
985 | skill NOUN
986 | unique ADJ
987 | gain VERB
988 | trail NOUN
989 | previously ADV
990 | walk NOUN
991 | target NOUN
992 | sleep NOUN
993 | individual ADJ
994 | item NOUN
995 | museum NOUN
996 | race NOUN
997 | aspect NOUN
998 | collection NOUN
999 | evaluate VERB
1000 | public NOUN
1001 | return NOUN
1002 | reference NOUN
1003 | crime NOUN
1004 | sign VERB
1005 | highly ADV
1006 | travel NOUN
1007 | branch NOUN
1008 | mechanism NOUN
1009 | post NOUN
1010 | facility NOUN
1011 | complex ADJ
1012 | link NOUN
1013 | consist VERB
1014 | regular ADJ
1015 | successful ADJ
1016 | vary VERB
1017 | platform NOUN
1018 | army NOUN
1019 | couple NOUN
1020 | legal ADJ
1021 | ready ADJ
1022 | maybe ADV
1023 | measurement NOUN
1024 | refer VERB
1025 | forest NOUN
1026 | drink NOUN
1027 | throw VERB
1028 | interesting ADJ
1029 | any PRON
1030 | release NOUN
1031 | trial NOUN
1032 | fish NOUN
1033 | influence VERB
1034 | order VERB
1035 | garden NOUN
1036 | concentration NOUN
1037 | respond VERB
1038 | review NOUN
1039 | pull VERB
1040 | soldier NOUN
1041 | Russian ADJ
1042 | another PRON
1043 | advantage NOUN
1044 | responsible ADJ
1045 | heavy ADJ
1046 | generate VERB
1047 | demand NOUN
1048 | though ADV
1049 | herself PRON
1050 | weight NOUN
1051 | worker NOUN
1052 | bed NOUN
1053 | concept NOUN
1054 | phone NOUN
1055 | completely ADV
1056 | visit NOUN
1057 | cross VERB
1058 | paint VERB
1059 | transport NOUN
1060 | flower NOUN
1061 | nearly ADV
1062 | Q NOUN
1063 | guide NOUN
1064 | Yeah INTJ
1065 | incident NOUN
1066 | wind NOUN
1067 | lack NOUN
1068 | clean ADJ
1069 | lake NOUN
1070 | newspaper NOUN
1071 | listen VERB
1072 | blue ADJ
1073 | distribution NOUN
1074 | deal NOUN
1075 | speech NOUN
1076 | shall AUX
1077 | relation NOUN
1078 | independent ADJ
1079 | northern ADJ
1080 | thought NOUN
1081 | purchase VERB
1082 | recommend VERB
1083 | error NOUN
1084 | sun NOUN
1085 | owner NOUN
1086 | combine VERB
1087 | manner NOUN
1088 | top ADJ
1089 | song NOUN
1090 | cause NOUN
1091 | council NOUN
1092 | general NOUN
1093 | additional ADJ
1094 | numerous ADJ
1095 | hill NOUN
1096 | worth ADJ
1097 | phase NOUN
1098 | with SCONJ
1099 | horse NOUN
1100 | dark ADJ
1101 | search NOUN
1102 | European ADJ
1103 | engage VERB
1104 | background NOUN
1105 | movie NOUN
1106 | downtown NOUN
1107 | ahead ADV
1108 | hospital NOUN
1109 | interaction NOUN
1110 | victim NOUN
1111 | primary ADJ
1112 | online ADJ
1113 | hang VERB
1114 | economy NOUN
1115 | push VERB
1116 | tax NOUN
1117 | yesterday NOUN
1118 | document NOUN
1119 | each PRON
1120 | moreover ADV
1121 | apartment NOUN
1122 | benefit NOUN
1123 | care VERB
1124 | bank NOUN
1125 | about SCONJ
1126 | stress NOUN
1127 | enough ADJ
1128 | professional ADJ
1129 | respect NOUN
1130 | taxis NOUN
1131 | teach VERB
1132 | conference NOUN
1133 | director NOUN
1134 | list VERB
1135 | federal ADJ
1136 | bridge NOUN
1137 | pick VERB
1138 | replace VERB
1139 | success NOUN
1140 | south NOUN
1141 | analyze VERB
1142 | mark VERB
1143 | lead NOUN
1144 | passenger NOUN
1145 | sensor NOUN
1146 | weather NOUN
1147 | taxi NOUN
1148 | gold NOUN
1149 | look NOUN
1150 | memory NOUN
1151 | tend VERB
1152 | cry VERB
1153 | hit VERB
1154 | total ADJ
1155 | before ADV
1156 | sister NOUN
1157 | spread VERB
1158 | collect VERB
1159 | learning NOUN
1160 | importance NOUN
1161 | protein NOUN
1162 | bill NOUN
1163 | bottom NOUN
1164 | head VERB
1165 | drop VERB
1166 | capacity NOUN
1167 | construction NOUN
1168 | arrest VERB
1169 | south ADV
1170 | belong VERB
1171 | club NOUN
1172 | immediately ADV
1173 | capture VERB
1174 | topic NOUN
1175 | crisis NOUN
1176 | requirement NOUN
1177 | shape NOUN
1178 | approximately ADV
1179 | southern ADJ
1180 | glass NOUN
1181 | unit NOUN
1182 | deal VERB
1183 | realize VERB
1184 | negative ADJ
1185 | generation NOUN
1186 | aim VERB
1187 | hair NOUN
1188 | decade NOUN
1189 | beginning NOUN
1190 | fly VERB
1191 | outcome NOUN
1192 | investment NOUN
1193 | frequency NOUN
1194 | presidential ADJ
1195 | attract VERB
1196 | declare VERB
1197 | fully ADV
1198 | reveal VERB
1199 | hard ADV
1200 | intend VERB
1201 | ice NOUN
1202 | instance NOUN
1203 | cancer NOUN
1204 | participate VERB
1205 | penalty NOUN
1206 | relatively ADV
1207 | ferry NOUN
1208 | respectively ADV
1209 | characteristic NOUN
1210 | scene NOUN
1211 | violence NOUN
1212 | resolution NOUN
1213 | majority NOUN
1214 | domain NOUN
1215 | cheap ADJ
1216 | injury NOUN
1217 | chief NOUN
1218 | engine NOUN
1219 | unknown ADJ
1220 | evening NOUN
1221 | dish NOUN
1222 | kid NOUN
1223 | adopt VERB
1224 | financial ADJ
1225 | stop NOUN
1226 | rich ADJ
1227 | anyone NOUN
1228 | edition NOUN
1229 | critical ADJ
1230 | Chinese ADJ
1231 | journalist NOUN
1232 | overall ADJ
1233 | refuse VERB
1234 | appropriate ADJ
1235 | audience NOUN
1236 | employ VERB
1237 | objective NOUN
1238 | attack VERB
1239 | useful ADJ
1240 | cost VERB
1241 | version NOUN
1242 | handle VERB
1243 | hole NOUN
1244 | control VERB
1245 | estimate VERB
1246 | act NOUN
1247 | suppose VERB
1248 | fresh ADJ
1249 | administration NOUN
1250 | driving VERB
1251 | healthy ADJ
1252 | protest NOUN
1253 | reflect VERB
1254 | opposition NOUN
1255 | fee NOUN
1256 | north NOUN
1257 | pretty ADV
1258 | university NOUN
1259 | principle NOUN
1260 | parking NOUN
1261 | huge ADJ
1262 | charge VERB
1263 | assume VERB
1264 | bag NOUN
1265 | daily ADJ
1266 | scale NOUN
1267 | host NOUN
1268 | significantly ADV
1269 | wave NOUN
1270 | one PRON
1271 | furthermore ADV
1272 | husband NOUN
1273 | digital ADJ
1274 | journey NOUN
1275 | forward ADV
1276 | cook VERB
1277 | chemical ADJ
1278 | contact NOUN
1279 | resistance NOUN
1280 | leg NOUN
1281 | commit VERB
1282 | seed NOUN
1283 | fund NOUN
1284 | failure NOUN
1285 | prove VERB
1286 | conflict NOUN
1287 | love NOUN
1288 | birth NOUN
1289 | basis NOUN
1290 | decrease VERB
1291 | basic ADJ
1292 | gun NOUN
1293 | interested VERB
1294 | survive VERB
1295 | own VERB
1296 | feeling NOUN
1297 | literature NOUN
1298 | calculate VERB
1299 | comfortable ADJ
1300 | robot NOUN
1301 | What DET
1302 | excellent ADJ
1303 | novel NOUN
1304 | wood NOUN
1305 | meal NOUN
1306 | text NOUN
1307 | contact VERB
1308 | relevant ADJ
1309 | sleep VERB
1310 | defeat VERB
1311 | proper ADJ
1312 | agent NOUN
1313 | Check VERB
1314 | extend VERB
1315 | display VERB
1316 | sentence NOUN
1317 | aircraft NOUN
1318 | county NOUN
1319 | French ADJ
1320 | efficiency NOUN
1321 | expensive ADJ
1322 | request NOUN
1323 | sale NOUN
1324 | sight NOUN
1325 | television NOUN
1326 | suffer VERB
1327 | improvement NOUN
1328 | entrance NOUN
1329 | which DET
1330 | possibly ADV
1331 | ward NOUN
1332 | spring NOUN
1333 | mix VERB
1334 | like SCONJ
1335 | responsibility NOUN
1336 | issue VERB
1337 | fit VERB
1338 | destroy VERB
1339 | settle VERB
1340 | consumption NOUN
1341 | implement VERB
1342 | college NOUN
1343 | landscape NOUN
1344 | clinical ADJ
1345 | view VERB
1346 | mission NOUN
1347 | employee NOUN
1348 | perspective NOUN
1349 | link VERB
1350 | typically ADV
1351 | chair NOUN
1352 | budget NOUN
1353 | stuff NOUN
1354 | thousand NOUN
1355 | doctor NOUN
1356 | religion NOUN
1357 | host VERB
1358 | square NOUN
1359 | variable NOUN
1360 | strength NOUN
1361 | selection NOUN
1362 | status NOUN
1363 | wrong ADJ
1364 | dollar NOUN
1365 | play NOUN
1366 | node NOUN
1367 | income NOUN
1368 | association NOUN
1369 | adult NOUN
1370 | prefer VERB
1371 | screen NOUN
1372 | agreement NOUN
1373 | medical ADJ
1374 | railway NOUN
1375 | extremely ADV
1376 | politics NOUN
1377 | festival NOUN
1378 | nor CCONJ
1379 | lady NOUN
1380 | cluster NOUN
1381 | theory NOUN
1382 | widely ADV
1383 | competition NOUN
1384 | help NOUN
1385 | complete ADJ
1386 | search VERB
1387 | coach NOUN
1388 | oppose VERB
1389 | institution NOUN
1390 | point VERB
1391 | store VERB
1392 | west NOUN
1393 | cultural ADJ
1394 | dry ADJ
1395 | divide VERB
1396 | fair ADJ
1397 | software NOUN
1398 | fruit NOUN
1399 | solve VERB
1400 | reduction NOUN
1401 | eventually ADV
1402 | thank VERB
1403 | aware ADJ
1404 | induce VERB
1405 | Internet NOUN
1406 | motor NOUN
1407 | organize VERB
1408 | understanding NOUN
1409 | neighborhood NOUN
1410 | fuel NOUN
1411 | murder NOUN
1412 | combination NOUN
1413 | pair NOUN
1414 | press VERB
1415 | initial ADJ
1416 | bury VERB
1417 | m NOUN
1418 | slowly ADV
1419 | otherwise ADV
1420 | medal NOUN
1421 | score NOUN
1422 | detection NOUN
1423 | notice VERB
1424 | warm ADJ
1425 | regional ADJ
1426 | finger NOUN
1427 | historical ADJ
1428 | exactly ADV
1429 | run NOUN
1430 | approach VERB
1431 | expand VERB
1432 | fan NOUN
1433 | procedure NOUN
1434 | print VERB
1435 | Australian ADJ
1436 | difficulty NOUN
1437 | crowd NOUN
1438 | certainly ADV
1439 | intervention NOUN
1440 | equipment NOUN
1441 | escape VERB
1442 | bomb NOUN
1443 | stick VERB
1444 | panel NOUN
1445 | specifically ADV
1446 | lay NOUN
1447 | religious ADJ
1448 | context NOUN
1449 | beat VERB
1450 | stone NOUN
1451 | regulation NOUN
1452 | perfect ADJ
1453 | finding VERB
1454 | none NOUN
1455 | normal ADJ
1456 | accus VERB
1457 | recorded VERB
1458 | deliver VERB
1459 | address NOUN
1460 | football NOUN
1461 | Italian ADJ
1462 | category NOUN
1463 | preserve VERB
1464 | assessment NOUN
1465 | clean VERB
1466 | depart VERB
1467 | assess VERB
1468 | reporter NOUN
1469 | acid NOUN
1470 | commercial ADJ
1471 | enhance VERB
1472 | potential NOUN
1473 | mental ADJ
1474 | repeat VERB
1475 | publication NOUN
1476 | science NOUN
1477 | forget VERB
1478 | damage NOUN
1479 | reply VERB
1480 | leave NOUN
1481 | input NOUN
1482 | camp NOUN
1483 | Iranian ADJ
1484 | middle NOUN
1485 | extra ADJ
1486 | unless SCONJ
1487 | coat NOUN
1488 | simulation NOUN
1489 | pain NOUN
1490 | standard NOUN
1491 | challenge VERB
1492 | brain NOUN
1493 | agency NOUN
1494 | possibility NOUN
1495 | launch VERB
1496 | gift NOUN
1497 | finding NOUN
1498 | root NOUN
1499 | German ADJ
1500 | bird NOUN
1501 | examine VERB
1502 | English ADJ
1503 | gather VERB
1504 | settlement NOUN
1505 | comparison NOUN
1506 | deny VERB
1507 | appearance NOUN
1508 | answer NOUN
1509 | execute VERB
1510 | transfer NOUN
1511 | protection NOUN
1512 | worry VERB
1513 | whatever PRON
1514 | attach VERB
1515 | ride VERB
1516 | battle NOUN
1517 | quarter NOUN
1518 | ancient ADJ
1519 | zone NOUN
1520 | writer NOUN
1521 | surgery NOUN
1522 | shot NOUN
1523 | originally ADV
1524 | separate ADJ
1525 | friendly ADJ
1526 | spatial ADJ
1527 | voter NOUN
1528 | lawyer NOUN
1529 | laugh VERB
1530 | twice ADV
1531 | cycle NOUN
1532 | accident NOUN
1533 | date VERB
1534 | license NOUN
1535 | grant VERB
1536 | lay VERB
1537 | likely ADV
1538 | suddenly ADV
1539 | restore VERB
1540 | meat NOUN
1541 | researcher NOUN
1542 | pronounce VERB
1543 | convert VERB
1544 | access VERB
1545 | advance VERB
1546 | fun ADJ
1547 | pool NOUN
1548 | manager NOUN
1549 | experiment NOUN
1550 | broad ADJ
1551 | crew NOUN
1552 | variation NOUN
1553 | talk NOUN
1554 | annual ADJ
1555 | frequently ADV
1556 | mouth NOUN
1557 | volume NOUN
1558 | strange ADJ
1559 | agricultural ADJ
1560 | cool ADJ
1561 | touch VERB
1562 | farmer NOUN
1563 | start NOUN
1564 | percent NOUN
1565 | claim NOUN
1566 | cup NOUN
1567 | hire VERB
1568 | load NOUN
1569 | chain NOUN
1570 | Israeli ADJ
1571 | British ADJ
1572 | inform VERB
1573 | billion NOUN
1574 | noise NOUN
1575 | storey NOUN
1576 | height NOUN
1577 | limit NOUN
1578 | formation NOUN
1579 | transportation NOUN
1580 | clothes NOUN
1581 | Click VERB
1582 | call NOUN
1583 | contribution NOUN
1584 | means NOUN
1585 | past NOUN
1586 | integrate VERB
1587 | conversation NOUN
1588 | military NOUN
1589 | freedom NOUN
1590 | dinner NOUN
1591 | wonder VERB
1592 | architecture NOUN
1593 | found VERB
1594 | direct VERB
1595 | cloud NOUN
1596 | crop NOUN
1597 | channel NOUN
1598 | east NOUN
1599 | session NOUN
1600 | tourism NOUN
1601 | biological ADJ
1602 | industrial ADJ
1603 | threaten VERB
1604 | quick ADJ
1605 | western ADJ
1606 | dry VERB
1607 | sustainable ADJ
1608 | actual ADJ
1609 | snow NOUN
1610 | resort NOUN
1611 | either DET
1612 | dedicate VERB
1613 | target VERB
1614 | stream NOUN
1615 | terminal NOUN
1616 | fashion NOUN
1617 | slow ADJ
1618 | trend NOUN
1619 | judge NOUN
1620 | female ADJ
1621 | stem NOUN
1622 | average ADJ
1623 | detect VERB
1624 | participant NOUN
1625 | belief NOUN
1626 | shore NOUN
1627 | slightly ADV
1628 | weekend NOUN
1629 | burn VERB
1630 | schedule VERB
1631 | firm NOUN
1632 | install VERB
1633 | teacher NOUN
1634 | stock NOUN
1635 | possession NOUN
1636 | rural ADJ
1637 | attraction NOUN
1638 | density NOUN
1639 | confidence NOUN
1640 | powerful ADJ
1641 | invite VERB
1642 | contractor NOUN
1643 | essential ADJ
1644 | comment NOUN
1645 | emergency NOUN
1646 | characterize VERB
1647 | household NOUN
1648 | intelligence NOUN
1649 | civil ADJ
1650 | metal NOUN
1651 | profile NOUN
1652 | master NOUN
1653 | drive NOUN
1654 | port NOUN
1655 | exposure NOUN
1656 | turn NOUN
1657 | danger NOUN
1658 | enable VERB
1659 | dangerous ADJ
1660 | exercise NOUN
1661 | highlight VERB
1662 | button NOUN
1663 | Avoid VERB
1664 | breakfast NOUN
1665 | plastic NOUN
1666 | bike NOUN
1667 | clearly ADV
1668 | expert NOUN
1669 | assist VERB
1670 | inspire VERB
1671 | native ADJ
1672 | busy ADJ
1673 | derive VERB
1674 | justice NOUN
1675 | sky NOUN
1676 | grid NOUN
1677 | code NOUN
1678 | politician NOUN
1679 | i PRON
1680 | package NOUN
1681 | copy NOUN
1682 | observation NOUN
1683 | fix VERB
1684 | acquire VERB
1685 | library NOUN
1686 | arrange VERB
1687 | youth NOUN
1688 | schedule NOUN
1689 | camera NOUN
1690 | consequence NOUN
1691 | farm NOUN
1692 | largely ADV
1693 | identity NOUN
1694 | entry NOUN
1695 | alternative NOUN
1696 | hence ADV
1697 | reader NOUN
1698 | fellow NOUN
1699 | baby NOUN
1700 | exchange NOUN
1701 | adult ADJ
1702 | latter ADJ
1703 | actor NOUN
1704 | compose VERB
1705 | email NOUN
1706 | scheme NOUN
1707 | somewhat ADV
1708 | trouble NOUN
1709 | careful ADJ
1710 | compound NOUN
1711 | arrival NOUN
1712 | historic ADJ
1713 | origin NOUN
1714 | hope NOUN
1715 | quiet ADJ
1716 | truth NOUN
1717 | web NOUN
1718 | along ADV
1719 | predict VERB
1720 | magazine NOUN
1721 | evaluation NOUN
1722 | guy NOUN
1723 | expose VERB
1724 | attitude NOUN
1725 | block NOUN
1726 | hide VERB
1727 | airline NOUN
1728 | strongly ADV
1729 | standard ADJ
1730 | rail NOUN
1731 | temple NOUN
1732 | portrait NOUN
1733 | commonly ADV
1734 | accuracy NOUN
1735 | recover VERB
1736 | captain NOUN
1737 | prison NOUN
1738 | properly ADV
1739 | vision NOUN
1740 | consumer NOUN
1741 | housing NOUN
1742 | voltage NOUN
1743 | defend VERB
1744 | anywhere ADV
1745 | reality NOUN
1746 | remaining VERB
1747 | adjust VERB
1748 | shopping NOUN
1749 | fear NOUN
1750 | comic NOUN
1751 | cave NOUN
1752 | subsequently ADV
1753 | present NOUN
1754 | bright ADJ
1755 | fourth ADJ
1756 | excite VERB
1757 | waste NOUN
1758 | leadership NOUN
1759 | territory NOUN
1760 | index NOUN
1761 | award VERB
1762 | Japanese ADJ
1763 | soft ADJ
1764 | wine NOUN
1765 | composition NOUN
1766 | pilot NOUN
1767 | sheet NOUN
1768 | range VERB
1769 | dress VERB
1770 | shoot VERB
1771 | sing VERB
1772 | eliminate VERB
1773 | Sources NOUN
1774 | expedition NOUN
1775 | prisoner NOUN
1776 | carefully ADV
1777 | opening NOUN
1778 | nearby ADJ
1779 | suitable ADJ
1780 | debate NOUN
1781 | at SCONJ
1782 | blog NOUN
1783 | afternoon NOUN
1784 | accompany VERB
1785 | injure VERB
1786 | alcohol NOUN
1787 | test VERB
1788 | flow VERB
1789 | hall NOUN
1790 | coffee NOUN
1791 | spirit NOUN
1792 | emission NOUN
1793 | relative ADJ
1794 | creation NOUN
1795 | conclude VERB
1796 | portion NOUN
1797 | enemy NOUN
1798 | earth NOUN
1799 | ingredient NOUN
1800 | lift VERB
1801 | angle NOUN
1802 | tissue NOUN
1803 | description NOUN
1804 | album NOUN
1805 | match VERB
1806 | occupy VERB
1807 | constant ADJ
1808 | beneficial ADJ
1809 | stick NOUN
1810 | atmosphere NOUN
1811 | impossible ADJ
1812 | admit VERB
1813 | accurate ADJ
1814 | department NOUN
1815 | peak NOUN
1816 | output NOUN
1817 | regard NOUN
1818 | duty NOUN
1819 | sand NOUN
1820 | local NOUN
1821 | websites NOUN
1822 | colony NOUN
1823 | skin NOUN
1824 | distribute VERB
1825 | satisfy VERB
1826 | pathway NOUN
1827 | propose ADJ
1828 | advice NOUN
1829 | cable NOUN
1830 | boundary NOUN
1831 | plate NOUN
1832 | residential ADJ
1833 | construct VERB
1834 | wild ADJ
1835 | proud ADJ
1836 | sex NOUN
1837 | CHAPTER NOUN
1838 | transfer VERB
1839 | hundred NOUN
1840 | biography NOUN
1841 | maximum ADJ
1842 | recipe NOUN
1843 | celebrate VERB
1844 | indicator NOUN
1845 | valley NOUN
1846 | climb VERB
1847 | supporter NOUN
1848 | closely ADV
1849 | frame NOUN
1850 | experimental ADJ
1851 | advance NOUN
1852 | afraid ADJ
1853 | block VERB
1854 | illegal ADJ
1855 | monitor VERB
1856 | sector NOUN
1857 | click VERB
1858 | separate VERB
1859 | assistance NOUN
1860 | thin ADJ
1861 | obviously ADV
1862 | circumstance NOUN
1863 | entirely ADV
1864 | scientific ADJ
1865 | castle NOUN
1866 | clothing NOUN
1867 | cut NOUN
1868 | matrix NOUN
1869 | struck VERB
1870 | qualify VERB
1871 | hurt VERB
1872 | plenty NOUN
1873 | wash VERB
1874 | please VERB
1875 | neither ADV
1876 | yellow ADJ
1877 | progress NOUN
1878 | accessible ADJ
1879 | argue VERB
1880 | practice VERB
1881 | technical ADJ
1882 | emerge VERB
1883 | prominent ADJ
1884 | mistake NOUN
1885 | contract NOUN
1886 | framework NOUN
1887 | mode NOUN
1888 | lip NOUN
1889 | circle NOUN
1890 | partner NOUN
1891 | eastern ADJ
1892 | upper ADJ
1893 | operator NOUN
1894 | professor NOUN
1895 | thick ADJ
1896 | very ADJ
1897 | efficient ADJ
1898 | expansion NOUN
1899 | fairly ADV
1900 | innovation NOUN
1901 | typical ADJ
1902 | prior ADV
1903 | mine NOUN
1904 | filter NOUN
1905 | disorder NOUN
1906 | enzyme NOUN
1907 | doubt NOUN
1908 | craft NOUN
1909 | coverage NOUN
1910 | infrastructure NOUN
1911 | afterwards ADV
1912 | severe ADJ
1913 | priest NOUN
1914 | rice NOUN
1915 | fight VERB
1916 | apparently ADV
1917 | log NOUN
1918 | 1st ADJ
1919 | tape NOUN
1920 | attribute VERB
1921 | dress NOUN
1922 | rebel NOUN
1923 | imagine VERB
1924 | respect VERB
1925 | sexual ADJ
1926 | brand NOUN
1927 | earn VERB
1928 | flat ADJ
1929 | painter NOUN
1930 | display NOUN
1931 | rule VERB
1932 | whole NOUN
1933 | colour NOUN
1934 | slave NOUN
1935 | fighting VERB
1936 | rare ADJ
1937 | usual ADJ
1938 | avd NOUN
1939 | transmission NOUN
1940 | cat NOUN
1941 | particle NOUN
1942 | athlete NOUN
1943 | maintenance NOUN
1944 | scientist NOUN
1945 | domestic ADJ
1946 | reportedly ADV
1947 | fault NOUN
1948 | primarily ADV
1949 | promise VERB
1950 | stable ADJ
1951 | knife NOUN
1952 | instrument NOUN
1953 | effectively ADV
1954 | abuse NOUN
1955 | regime NOUN
1956 | tie VERB
1957 | nomination NOUN
1958 | invest VERB
1959 | extensive ADJ
1960 | criterion NOUN
1961 | less ADJ
1962 | alternative ADJ
1963 | Indian ADJ
1964 | hate VERB
1965 | comment VERB
1966 | storm NOUN
1967 | damage VERB
1968 | classification NOUN
1969 | storage NOUN
1970 | command NOUN
1971 | highway NOUN
1972 | radio NOUN
1973 | tall ADJ
1974 | correlation NOUN
1975 | strain NOUN
1976 | human NOUN
1977 | tank NOUN
1978 | east ADV
1979 | long-term NOUN
1980 | guest NOUN
1981 | equal ADJ
1982 | limitation NOUN
1983 | resolve VERB
1984 | beauty NOUN
1985 | depth NOUN
1986 | solar NOUN
1987 | disaster NOUN
1988 | shoulder NOUN
1989 | creature NOUN
1990 | editor NOUN
1991 | sufficient ADJ
1992 | sustainability NOUN
1993 | credit NOUN
1994 | profit NOUN
1995 | diverse ADJ
1996 | fink VERB
1997 | victory NOUN
1998 | while NOUN
1999 |
--------------------------------------------------------------------------------
/zmk-chorded.py:
--------------------------------------------------------------------------------
1 | import csv
2 | import utils
3 |
4 | # Limit how many rows to process since microcontrollers such as nice nano have quite limited memory
5 | # You'll need to lower this if you get "region `RAM' overflowed errors" when compiling
6 | limit = 100
7 | # How long in ms you have to press the combo keys together, you can be pretty relaxed here if combo is its own unique key
8 | combo_timeout = 100
9 | # You need to map all of your keys here since zmk combos are offset based
10 | # You can use an empty string ("") for anything other than letters, punctuation and combo positions such that it adds up to the total numbers of keys on your keyboard, check the example below
11 | key_positions = [
12 | ["W", "L", "Y", "P", "B", "Z", "F", "O", "U", "'"],
13 | ["C", "R", "S", "T", "G", "M", "N", "E", "I", "A"],
14 | ["Q", "J", "V", "D", "K", "X", "H", ";", ",", "."],
15 | ["COMBO_ALT1", "COMBO_ALT2", "COMBO_SFT", "COMBO"],
16 | ]
17 |
18 | # 42-key keyboard example
19 | # key_positions = [
20 | # ["", "W", "L", "Y", "P", "B", "Z", "F", "O", "U", "'", ""],
21 | # ["", "C", "R", "S", "T", "G", "M", "N", "E", "I", "A", ""],
22 | # ["", "Q", "J", "V", "D", "K", "X", "H", ";", ",", ".", ""],
23 | # ["", "COMBO_ALT1", "COMBO_ALT2", "COMBO_SFT", "COMBO", ""],
24 | # ]
25 |
26 | trigger_keys = ["COMBO"]
27 | shifted_keys = ["COMBO_SFT"]
28 | alt_keys = [["COMBO_ALT1"], ["COMBO_ALT2"], ["COMBO_ALT1", "COMBO_ALT2"]]
29 |
30 | key_map = {
31 | "'": "QUOT",
32 | ";": "SEMI",
33 | ",": "COMMA",
34 | ".": "DOT",
35 | " ": "SPC",
36 | "@": "AT",
37 | "?": "QUESTION",
38 | "←": "BSPC",
39 | }
40 |
41 | key_positions = [item for items in key_positions for item in items]
42 | seen = {}
43 | output = ""
44 | macros = """#define MACRO(NAME, BINDINGS) \\
45 | macro_##NAME: macro_##NAME { \\
46 | compatible = "zmk,behavior-macro"; \\
47 | #binding-cells = <0>; \\
48 | wait-ms = <0>; \\
49 | tap-ms = <10>; \\
50 | bindings = ; \\
51 | };
52 |
53 | """
54 |
55 | combos = (
56 | """#define COMBO(NAME, BINDINGS, KEYPOS) \\
57 | combo_##NAME { \\
58 | timeout-ms = <"""
59 | + str(combo_timeout)
60 | + """>; \\
61 | bindings = ; \\
62 | key-positions = ; \\
63 | layers = <0>; \\
64 | };
65 |
66 | """
67 | )
68 | line_no = 0
69 |
70 |
71 | key_positions_map = {}
72 | for i, key in enumerate(key_positions):
73 | key_positions_map[key] = i
74 |
75 | seen_positions = {}
76 |
77 |
78 | def translate_keys(abbr):
79 | result = []
80 | for k in abbr:
81 | k = k.upper()
82 | if k in key_positions_map:
83 | result.append(key_positions_map[k])
84 | else:
85 | raise Exception(
86 | f'Unable to find key position for {k}, is it in "key_positions"?'
87 | )
88 | # ensure there is no duplicate positions used since zmk doesn't check
89 | result.sort()
90 | result = [str(i) for i in result]
91 | name = " ".join(result)
92 | if name in seen_positions:
93 | raise Exception(
94 | f"Error: duplicate combos on lines {seen_positions[name]} and {line_no}"
95 | )
96 | seen_positions[name] = line_no
97 | return result
98 |
99 |
100 | def translate_macro(word, capitalize=False):
101 | result = []
102 | for i, k in enumerate(word):
103 | k = k.upper()
104 | kp = "&kp "
105 | if capitalize and i == 0:
106 | kp += "LS("
107 |
108 | if k in key_map:
109 | kp += key_map[k]
110 | else:
111 | kp += k
112 |
113 | if capitalize and i == 0:
114 | kp += ")"
115 |
116 | result.append(kp)
117 | return result
118 |
119 |
120 | print("Processing abbr.tsv")
121 | with open("abbr.tsv") as file:
122 | file = csv.reader(file, delimiter="\t")
123 | for p in [";", ",", "."]:
124 | name = f"c_{key_map[p]}"
125 | macro = translate_macro(f"←{p} ")
126 | positions = translate_keys([p] + trigger_keys)
127 | macros += f'MACRO({name}, {" ".join(macro)})\n'
128 | combos += f'COMBO({name}, ¯o_{name}, {" ".join(positions)})\n'
129 |
130 | for line in file:
131 | line_no += 1
132 | if limit != 0 and line_no > limit:
133 | print(f"Stopping at line {limit} due to limit setting")
134 | break
135 |
136 | if line[1]:
137 | abbr = line.pop(1)
138 | if abbr in seen:
139 | raise Exception(
140 | f'Error line {line_no}: already used trigger "{abbr}" for word "{seen[abbr]}"'
141 | )
142 |
143 | combinations = utils.find_all_combinations(abbr)
144 | for a in combinations:
145 | seen[a] = line[0]
146 |
147 | for i, word in enumerate(line):
148 | if not word:
149 | continue
150 | alt = []
151 | if i != 0:
152 | alt = alt_keys[i - 1]
153 | name = f'c_{abbr}{"_" * i}'.replace("'", "_")
154 | macro = translate_macro(word + " ")
155 |
156 | positions = translate_keys(list(abbr) + trigger_keys + alt)
157 | macros += f'MACRO({name}, {" ".join(macro)})\n'
158 | combos += f'COMBO({name}, ¯o_{name}, {" ".join(positions)})\n'
159 |
160 | # shifted
161 | positions = translate_keys(
162 | list(abbr) + trigger_keys + alt + shifted_keys
163 | )
164 | macro = translate_macro(word + " ", True)
165 | macros += f'MACRO(s_{name}, {" ".join(macro)})\n'
166 | combos += f'COMBO(s_{name}, ¯o_s_{name}, {" ".join(positions)})\n'
167 |
168 | print("writing macros.dtsi")
169 | with open("macros.dtsi", "w") as file:
170 | file.write(macros)
171 |
172 | with open("combos.dtsi", "w") as file:
173 | file.write(combos)
174 | print("writing combos.dtsi")
175 | print("done")
176 |
--------------------------------------------------------------------------------