Ticket #1480 (new enhancement)

SVN Diffs for #1480

 

Opened 7 years ago

Last modified 1 year ago

Add negation to transliterator

Reported by: mark.davis(at)jtcsv.com Assigned to: andy
Priority: trivial Milestone: UNSCH
Component: transliterate Version: cvs
Keywords: transliterate Cc:
Load: Xref: 3921
Java Version: Operating System: all
Project (C/J): all Weeks: 1
Review:

Description

Add a constrained negation to transliteration, e.g.

a } !([:M:]*[:L:]*) > X

The constraints are to designed to make it easy to implement and predict. They are:

A negation can only be leading or trailing. That is, you can't have anything before a negation in the BEFORE context, and nothing after a negation in the source or AFTER context.

!a b { c d } e !f > X ; # valid !a b { c d } !(e f) > X ; # valid !a b { c !d } > X ; # valid !a b { !c } > X ; # valid

!a b { c d } !e f > X ; # invalid a !b { c d } e !f > X ; # invalid !a b { c !d } e f > X ; # invalid

The implementation is to (a) disallow any invalids (b) for all valid cases, set a flag on the node. When the match is made, true/false are switched when returning from that node. (c) if the negation affects the first character of the source, then the rule is put into the inverse set of buckets (from what it would normally be put in).

Attachments

Change History

12/31/69 18:26:56 changed by auditor

  • " to "
  • ",

09/28/07 12:29:34 changed by andy

  • load changed.
  • project set to all.
  • java changed.
  • revw changed.
  • summary changed from RFE: Add negation to transliterator to Add negation to transliterator.

Add/Change #1480 (Add negation to transliterator)




Anti spam check: