For those who have trouble installing or building a patched version, a
simple workaround is to unify duplicate entries by tacking all of the
glosses together. Here's an AWK script that does the job. Run this on
your tab separated file and it will transform, e.g.:
'at wife
'at over there
into
'at wife, over there
----------
BEGIN {
FS="\t";
PreviousHeadword="";
}
{
if($NF < 2) next;
Headword=$1;
Gloss=$2;
if(Headword == PreviousHeadword) {
Accum = Accum ", " Gloss;
} else {
if(NR > 1) printf("%s\t%s\n",PreviousHeadword,Accum);
Accum=Gloss;
}
PreviousHeadword=Headword;
}
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1313920
Title:
stardict-tools doesn't allow duplicate keys
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/stardict-tools/+bug/1313920/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs