Posts

Showing posts from March 25, 2007

Reflection Emit

Image
I've been trying to integrate reflection emit into Tenka Text recently and that's how far I have come in code: Builder.cs . You can use reflection emit to compile and build types at runtime. A pretty amazing way of using this technology is having an abstract class whose implementation you provide at runtime. Tenka Text is going to use reflection emit to provide custom segmentation. Using reflection emit instead of going for a simpler approach has numerous distinguishing advantages. I quote my friend Mike Scott from the documentation of his WordSmith Tools 4 here: [...] you may wish to allow certain additional characters within a word. For example, in English, the apostrophe in father's is best included as a valid character as it will allow processing to deal with the whole word instead of cutting it off short. (If you change language to French you might not want apostrophes to be counted as acceptable mid-word characters.) Examples: ' (only apostrophes allowed in the mi...