This site is supported by donations to The OEIS Foundation.

User talk:M. F. Hasler/Work in progress/Improvements of OEIS

From OeisWiki
Jump to: navigation, search

Keyword parentheticals

I like the idea of expanded keywords (see User:Charles R Greathouse IV/Keywords/Table for some thoughts of mine and Daniel's) and parenthetical notes on keywords. I think that, for technical reasons, it may be desirable to avoid commas in parentheses.* What would you think of using semicolons or some other punctuation?

* Take a keyword field, order alphabetically, and surround by commas, so that "nonn,base" becomes ",base,nonn,". Now a keyword search can use a regular expression (fast) on the text field to check all keywords in a query (possibly after other preprocessing). In the simple case of a single keyword it's just a text search: to find a base sequence just look for the string ",base,". (The modifications for parentheticals is simple.) But if there are commas in parentheses and the characters "base," come after a comma then the sequence might wrongly be flagged as a base sequence... Of course one might use a bitmask instead, which would be faster but would not allow parentheticals. The two could be combined, of course, with the bitmask first for speed and the regex search afterward if the keywords searched for have parentheticals. But then we run into the same problem.

Charles R Greathouse IV 06:32, 24 January 2013 (UTC)

I have no objection on that, indeed for efficiency it will be better to have "kw separators" different from "argument separators".
Had a glance on your table: the ":" separator is a very good idea, allowing to append several args where needed. Adding a trailing ":" would even allow a unabiguous "simple text" search for the arguments (esp. in case those take the form of "keyword-modifier-keywords" which might occur in /apply to several distinct kw's) — M. F. Hasler 17:46, 30 January 2013 (UTC)