Skip to content

Equivalent of nltk.RegexpParser #82

Discussion options

You must be logged in to vote

Hey @OmarJay1

Equivalent of nltk.RegexpParser is not available in winkNLP as of now. It's in our roadmap. You can explore the custom entities extraction which can serve the purpose for the type of use case you have mentioned.

A sample code is attached for your reference.

const winkNLP = require( 'wink-nlp' );
const model = require( 'wink-eng-lite-web-model' );
const nlp = winkNLP( model );
const its = nlp.its;

const patterns = [
  { name: 'LOCATION', patterns: [ '[in|from|to] [PROPN] [PROPN] [of] [PROPN]' ], mark: [1, 4] },
  { name: 'LOCATION', patterns: [ '[in|from|to] [PROPN]' ], mark: [1, 1] },
  { name: 'LOCATION', patterns: [ '[in|from|to] [PROPN] [PROPN]' ], mark: [1, 2] },
  { na…

Replies: 1 comment 1 reply

Comment options

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

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