Home > other >  Stammer participle word segmentation effect change
Stammer participle word segmentation effect change

Time:10-05

I want to put "super" into "super" and "high" two words, if the text="feel super high", word segmentation results for "touch/super/high"
But when text="feel is too high", the word segmentation results for "feel is/are/ultra high", don't know why I added "and" after "super" is inseparable, please answer
Source:
The import jieba
The import jieba. Analyse
The import jieba. Posseg as pseg

Jieba. Load_userdict (" C: \ \ Users \ Administrator DESKTOP - D3778LN \ DESKTOP \ wenbenchuli \ Hownet \ dict TXT ")

For i1 in [" pretty ", "highly", "odd", "super"] :
For i2 [in "fast", "slow", "long", "short", "big", "small", "good" and "bad", "high"] :
Jieba. Suggest_freq ((i1, i2), most cerebral sci-film=True)

text="feel is also high"
Document_cut=jieba. The cut (text)
Words=pseg. The cut (text)

Result="'. Join (document_cut)

Print (result)


CodePudding user response:

CodePudding user response:

  • Related