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
I have a custom lexicon that links hashtags to tags. This worked in an older version of compromise (v11.14) but does not seem to be working in 13.11.4.
// I would expect this to match, but it does notnlp("#GoJetsGo",{"#GoJetsGo": "SportsTeam"}).match("#SportsTeam").text()// ''// this can work, however I would like to make sure only the hashtag is matchednlp("#GoJetsGo GoJetsGo",{"GoJetsGo": "SportsTeam"}).match("#SportsTeam").text()// '#GoJetsGo GoJetsGo'// if # is not the leading character it does work, so seems to only happen when it's leadingnlp("Go#JetsGo",{"Go#JetsGo": "SportsTeam"}).match("#SportsTeam").text()// '#Go#JetsGo'
This seems like it may be intentional (perhaps the built-in hashTag logic is conflicting?), but I'm having trouble finding anything in the docs that would say so.
edit: this also appears to happen for terms beginning with @. i.e, associating "@NHLJets": "#SportsTeam" will not work either.
The text was updated successfully, but these errors were encountered:
hey @mattjennings thanks - this is a good issue. You're right, something is bad. It's started tripping on the TitleCase bit, after the pound symbol. This is bad. I removed an 'i' from a regex a few versions back, and didn't have a test for it.
I have a custom lexicon that links hashtags to tags. This worked in an older version of compromise (v11.14) but does not seem to be working in 13.11.4.
This seems like it may be intentional (perhaps the built-in hashTag logic is conflicting?), but I'm having trouble finding anything in the docs that would say so.
edit: this also appears to happen for terms beginning with
@
. i.e, associating"@NHLJets": "#SportsTeam"
will not work either.The text was updated successfully, but these errors were encountered: