You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another rule kit - for things like "Bank of Canada".
/** * Extracts Bank of #Place from a given text. * * @param {string} str - The input text to analyze. * @returns {string|false} - The extracted bank name or false if no match is found. */functionbankOfRule(str){// Create an NLP document from the input textletdoc=nlp(str);// Check for patterns like "the national bank of Canada"letmatch=doc.match("(international|national) bank of (#Place+|#Place)");if(match.found){returnmatch.out("text");}// Check for patterns like "bank of Canada"match=doc.match("bank of (#Place+|#Place)");if(match.found){returnmatch.out("text");}returnfalse;// Return null if no bank names is found}
The text was updated successfully, but these errors were encountered:
good idea - 'bank' is already in orgwords but bank of #Place+ is a good candidate for ./postTagger/model/orgs is you wanted to add it - (the + matches one or more matches)
cheers
Another rule kit - for things like "Bank of Canada".
The text was updated successfully, but these errors were encountered: