Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex refactor #2

Open
trevorsummerssmith opened this issue Oct 13, 2012 · 4 comments
Open

Regex refactor #2

trevorsummerssmith opened this issue Oct 13, 2012 · 4 comments

Comments

@trevorsummerssmith
Copy link
Owner

  • Figure out what to do about the triple (graph, transition, transition_op)
    should we have a class for this? Is it a thing or do we need to refactor
    the regex stuff a bit?
  • Rename the 'filter.py' module and its classes. It's confusing to have a filteregex
    and the filter paradigm. Maybe:
    • pattern is a regex
    • sensor is a ball
    • combinator is a stick
    • or
    • sensor operator = ball
    • nexus operator = stick
    • branch operator = rank-3 and higher tensors

Also make a 'regex' module. 'regex_parser' => ast. Make things more sane.

@epurdy
Copy link
Collaborator

epurdy commented Oct 14, 2012

I vote for

  • pattern (was: regex)
  • sensor (was: filterregex)
  • nexus (was: graph, transition, transition_op)
  • combinator (rank-3 and higher tensors)

@trevorsummerssmith
Copy link
Owner Author

I think I'll add these changes. However, I want to keep the comments that talk about regexes (eg "We wish to manipulate probability distributions over the nodes of a Markov chain. ... Regexes are an intuitive way to specify such linear operators.").

But then just add some stuff that says, at the end of the regex.py module comment "However note that we wish to distinguish between three types of regexes: sensor, nexus and combinator".

Thoughts?

@trevorsummerssmith
Copy link
Owner Author

Actually I think I like 'regex' better than 'pattern'. More thoughts? @epurdy

@epurdy
Copy link
Collaborator

epurdy commented Oct 16, 2012

"regex" does sound better than "pattern", but at some point we should give it a new name, just so that it doesn't sound like a classical regular expression. I think they're strictly more powerful than regular expressions, and if they actually become common, we're going to want to distinguish between them.

I'm having trouble thinking of what to call it, though. "nexop" (nexus operator)? "semex" (semiotic expression)? "semop" (semiotic operator)? "gramex" (grammatical expression)? "gramop" (grammatical operator)?

If I had to choose any of those, I think I'd choose semex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants