Skip to content

How to add #SearchBang tag. #1177

Answered by spencermountain
Leftium asked this question in Q&A
Discussion options

You must be logged in to vote

hey John-Kim, I started some work on a command-prompt plugin. There are some tiny weird things that I'd like to change for the next release.
For one - your example with a bare ! as a single word. You'll see the tokenizer bolts it onto the preceding word, so it's hard to pull-out:

console.log(nlp('! we walk').docs[0])
/*[
  {
    text: 'we',
    pre: '! ', // ends up here
    post: ' ',
    tags: Set(1) { 'SearchBang' }
  },
  {
    text: 'walk',
    pre: '',
    post: '',
    tags: Set(3) { 'Verb', 'PresentTense', 'Infinitive' },
    normal: 'walk',
  }
]*/

really, this should obey any words that are entered into the lexcion, even if the word is '!'.

Second, I started on a slash command o…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@Leftium
Comment options

@Leftium
Comment options

Comment options

You must be logged in to vote
1 reply
@Leftium
Comment options

Answer selected by Leftium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants