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
#Month seems to get missed for some texts prefixed with for :
constnlp=require('compromise')consttext=['for January 2022',// broken'for February 2022','for March 2022','for April 2022',// broken'for May 2022','for June 2022',// broken'for July 2022','for August 2022',// broken'for September 2022','for October 2022','for November 2022','for December 2022','in January 2022','in February 2022','in March 2022','in April 2022','in May 2022','in June 2022','in July 2022','in August 2022','in September 2022','in October 2022','in November 2022','in December 2022','on January 2022','on February 2022','on March 2022','on April 2022','on May 2022','on June 2022','on July 2022','on August 2022','on September 2022','on October 2022','on November 2022','on December 2022','January 2022','February 2022','March 2022','April 2022','May 2022','June 2022','July 2022','August 2022','September 2022','October 2022','November 2022','December 2022',]constmonthCheck=text.map((t)=>({text: t,hasMonth: nlp(t).match('#Month').length>0}))console.log(monthCheck.filter((m)=>!m.hasMonth))
Expected Result
All items in the array should have a #Month tag - so the console.log() should output an empty array
Actual Result
[{text: 'for January 2022',hasMonth: false},{text: 'for April 2022',hasMonth: false},{text: 'for June 2022',hasMonth: false},{text: 'for August 2022',hasMonth: false}]
The text was updated successfully, but these errors were encountered:
#Month
seems to get missed for some texts prefixed withfor
:Expected Result
All items in the array should have a
#Month
tag - so theconsole.log()
should output an empty arrayActual Result
The text was updated successfully, but these errors were encountered: