knowitall / taggers

Easily identify and label sentence intervals using various taggers.
11 stars 12 forks source link

Type pattern replacement syntax #13

Closed jgilme1 closed 11 years ago

jgilme1 commented 11 years ago

Do you think the regex is conservative enough?

schmmd commented 11 years ago

It's hacky. It would fail here for example:

{MyType} <postag=/a{2} />

I know some similar problems in my code. Any ideas on how to minimize problems here? I gave up last time I was thinking about it.

jgilme1 commented 11 years ago

Ok how about

\{([^\}]+)\}(?![^<]*>)
jgilme1 commented 11 years ago

@schmmd What do you think?

schmmd commented 11 years ago

Doh! Thanks for the reminder John.