[
https://issues.apache.org/jira/browse/MAHOUT-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917279#action_12917279
]
Joe Prasanna Kumar commented on MAHOUT-271:
-------------------------------------------
Sean,
I just finished manually testing the fix. The patch works good.
For testing this out, I injected some data into a single chunk of xml file that
gets created using WikipediaXMLSplitter. In the xml file, I modified some of
the values in "category" as india and some as indiana. When I ran
wikipediaDataSetCreator using the old code, the output had both values of india
and indiana. When I ran wikipediaDataSetCreator with the patch, i got results
that matched just india. So this fix is good to go.
I am not sure if we need a test case for this. If so, I can probably work on
one and the test case could go with 0.5 ?
reg,
Joe.
> Make WikipediaDatasetCreatorMapper fuzzy category match respect word
> boundaries
> -------------------------------------------------------------------------------
>
> Key: MAHOUT-271
> URL: https://issues.apache.org/jira/browse/MAHOUT-271
> Project: Mahout
> Issue Type: Improvement
> Components: Classification
> Affects Versions: 0.2
> Reporter: Olivier Grisel
> Assignee: Olivier Grisel
> Priority: Trivial
> Fix For: 0.4
>
> Attachments: MAHOUT-271.patch
>
>
> WikipediaDatasetCreatorDriver is useful to create categorisation corpora out
> of wikipedia, however the category match just do a String#contains check
> which can catch a lot of unrelated categories.
> Checking the word boundaries with a regexp such as String.format("\\b%s\\b",
> theCategoryNameIAmLookingFor); should fix the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.