Hi,
OK but in practice, there aren't any escape characters in a text. How to
translate a text?

echo "Hans satt nu i styrelsen för andelsboligforeningen Alligator AB.
Fast han hade länge tvekat, han förstod inte riktigt skillnaden mot en
bostadsrättsförening. Hans nya bolag skulle heta Baljan AB. Fast han
hade länge tvekat om bolagsformen, om han skulle välja AB eller enskild
firma. Om han startat på andra sidan sundet hade den fått heta Baljan
A/S. Menaktieselskab skulle klingat lite fel i munnen, tänkt han." |
apertium -d /home/per/Repository/apertium-sv-da sv-da

Hans sad nu i *styrelsen før andelsboligforeningen Alligator #A$^. *Fast
han havde længe tøvet, han forstod ikke rigtigt forskellen mod en
andelslejlighedsforening. Hans nye selskaber skulle hede Bælgen #A$^.
*Fast han havde længe tøvet om *bolagsformen, om han skulle *välja #A$
^eller personlig *firma. Om han startet på andre siden sundet havde den
fået hede Bælgen #S. *Menaktieselskab skulle klinget lidt fejl i munden,
tænkt han.

Yours,
Per Tunedal

On Thu, Nov 22, 2012, at 12:37, Kevin Brubeck Unhammer wrote:
> Francis Tyers <[email protected]> writes:
> 
> > El dj 22 de 11 de 2012 a les 09:10 +0100, en/na Per Tunedal va escriure:
> >> Hi,
> >> Apertium doesn't like the Danish habit to include the sign "/" in
> >> abbreviations:
> >> 
> >> A/B a/b A/S etc
> >> 
> >> A/S gives me:  #A$
> >> 
> >> Is "/" a forbidden character? Should I use an escape character or what?
> >
> > It is a reserved character:
> >
> > http://wiki.apertium.org/wiki/Apertium_stream_format
> 
> Ie. as long as it's escaped (has a \ before it) in the input before
> reaching lt-proc, it works just fine. The "apertium" command does this
> automatically, by calling apertium-destxt (or -deshtml etc.) before
> lt-proc and the rest of the pipeline. Using \ in dix files works just
> fine, no escaping needed there. If it's not part of a word, as in the
> sequence "om/gillade/älskade", it'll be treated as a space character
> (this happens to any character that's not in <alphabet>, so two words
> separated by some odd character like · should also be analysed as two
> separate units).
> 
> [...]
> 
> >> echo "Hans nya bolag skulle heta Baljan AB. Fast han hade länge tvekat
> >> om bolagsformen, om han skulle välja AB eller enskild firma. Fattar du
> >> inte. Han tyckte om/gillade/älskade korv. Välj det du tycker passar
> >> bäst!" | apertium -d /home/per/Repository/apertium-sv-da sv-da
> >> 
> >> Doesn't work either.
> >
> > That's because of bash interpreting the '!' as "run the previous
> > command. You need to escape it in the terminal.
> 
> You can use ' instead of " to avoid the shell interpreting ! and $, but
> then if you want to write «it's coming right for us!», you'll have to
> switch quote-method in the middle of the string:
> 
> $ echo "It's" 'coming right for us!' | apertium …
> 
> With longer examples it might be simpler to put it into a text file and
> do
> 
> $ <file.txt apertium …
> 
> 
> 
> -- 
> Kevin Brubeck Unhammer
> 
> GPG: 0x766AC60C
> 
> 
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> Apertium-stuff mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/apertium-stuff

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to