There are a couple of other places where a similar change could be made, but I remember some possible problem with the look-behinds and some of the other tools that use this list, so I'd like to open it up for discussion first. So the extra check is only made once AWB has gotten a possible match, not on every spot. I replaced it with a (buggy, but now fixed) version with no zero-width assertions, but the look-behind version would have been: see if tremelo/Tremelo/tremelos/Tremelos is the next string if so, and it doesn't end with an s, make sure it wasn't Tremelo if it wasn't, replace the middle with remolo. Putting it at the beginning doubles the effort on things like Tremelo: at each check point (in this case, between every letter), see if Tremelo is the next string if not, see if tremelo/Tremelo/tremelos/Tremelos is the next string if so, replace the middle with remolo. I think that starting a search string with a zero-width look-ahead and then the desired search string, usually used to exclude certain proper names, is harder on performance than either avoiding the zero-width assertions or using a zero-width look-behind assertion after the desired search string.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |