Pangu word segmentation-No search results for keywords (keywords consist of unindexed words)

Source: Internet
Author: User

Any combination of unindexed words A, B, and C does not produce any search results.

Solution: Set the UnknownWordIdentify option to False.

The following is the processing segment in Pangu code:

If (count = 0)
{
If (_ Options. unknownwordiden)
{
WordInfo wi = new WordInfo ();
Wi. Word = orginalText;
Wi. Position = 0;
Wi. WordType = WordType. None;
Wi. Rank = 1;
Result. AddFirst (wi );
Return result;
}
Else
{
Int position = 0;
Foreach (char c in orginalText)
{
WordInfo wi = new WordInfo ();
Wi. Word = c. ToString ();
Wi. Position = position ++;
Wi. WordType = WordType. None;
Wi. Rank = 1;
Result. AddLast (wi );
}

Return result;
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.