-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUSAGE
74 lines (59 loc) · 2.81 KB
/
USAGE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Usage
=====
Invoke kamusi preferably via
$ rlwrap perl kamusi
When you simply enter a word, kamusi will output all matching words in
the currently selected language together with their meaning and
further descriptions.
There are some simple commands, all of them beginning with an underscore (_),
to control kamusi's behaviour. You can also set these parameters
beforehand, via command line options. (Multiple options can be
combined, thus `kamusi -svd sw' will toggle [turn on] squashing,
verbose mode and switch the direction to sw->en.)
Switch Command Meaning
====== ======= =======
-d en _en swith the search language en->sw [this is the startup default]
-d sw _sw swith the search language sw->en
-v _v toggle verbose output [default: off]
-t VAL _t [TYPE] display only results of type TYPE, where TYPE is on of [1]
ommitting TYPE is equal to allowing all types be displayed.
-s _sq Toggle squashing [for each type of word, all matches will
be displayed in on long line, separated by a ';'. default: off]
-E _ex toggle the display of examples if provided [default: on]
_q quit kamusi; you can also achieve this with Ctrl-C or Ctrl-D
Wildcards and Verb Prefixes
===========================
As of now, use the standard SQL wild cards (% for arbitrary match). Note that
most verbs are in fact available with a leading hyphen only, so searching for
the meaning of "nililia", you should precede the verb root with a hyphen: -lia.
Example Run
===========
Let's take an example: you occasionally hear people shouting something along
the lines of "nia".
kamusi> _sw
now searching sw -> en.
kamusi> _ex
examples turned off
kamusi> %nia
[ .. lots of output ... ]
kamusi> _t phrase
will only display results of type 'phrase'.
kamusi> %nia
phrase: nia = {{ it is clear }}
phrase: -ning'inia = {{ I have }}
phrase: -tania = {{ it is beyond his strength }}
So there, you found it! :-)
Batch/Query mode
================
You might want to invoke this script non-interactively[2]. That's no problem,
just type your lookup string after the command line options like this:
$ perl kamusi -sd sw -t verb %nia
[1] the most common types are: adjective, adverb, noun, verb; to
obtain a full list of types available, issue the following command:
$ grep Part\ of sall.txt | cut -d' ' -f4 | sort | uniq -c | sort -bgr
[2] An example use case is if you bind a small shell script to a
specific key combination in your window manager. You might use a
command like `xclip -o | xargs ~/bin/kamusi -s | notify-send' to
open a little popup dialog for a few seconds, displaying all the
possible meanings of the word you just selected in your web
browser.