Weight modifier #49

Closed
char101 opened this Issue Apr 9, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@char101

char101 commented Apr 9, 2012

Hi,

Could you add a parameter to the rule definition that can modify the rule weight, such as

{at: '...', 'char': '...', input: '...', 'weight': 5} -> rule weight = 5 + original weight

. This is required because sometimes the number of character in the regexp does not correlate to the specificity of the regexp

For example

\%#} is more specific than \%#\s*}
@kana

This comment has been minimized.

Show comment Hide comment
@kana

kana Apr 9, 2012

Owner

Thank you for the idea. I know that there are several situations to control the priorities of rules explicitly. But I want to polish the plugin to make it more stable at the moment. So I do no plan to add such a feature soon.

If you still want to control the priorities of rules, add meaningless patterns to at values. For example, use \%#}\ze\ze instead of \%#} to make rules more specific than \%#\s*}.

Owner

kana commented Apr 9, 2012

Thank you for the idea. I know that there are several situations to control the priorities of rules explicitly. But I want to polish the plugin to make it more stable at the moment. So I do no plan to add such a feature soon.

If you still want to control the priorities of rules, add meaningless patterns to at values. For example, use \%#}\ze\ze instead of \%#} to make rules more specific than \%#\s*}.

@char101

This comment has been minimized.

Show comment Hide comment
@char101

char101 Apr 9, 2012

Okay, thank you for the hint.

char101 commented Apr 9, 2012

Okay, thank you for the hint.

@char101 char101 closed this Apr 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment