-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enriched NoContentFilter #33
Enriched NoContentFilter #33
Conversation
…o large-freq-tag-paragpraph-filter
lib/src/main/scala/com/worksap/nlp/uzushio/lib/filters/NoContentDOM.scala
Outdated
Show resolved
Hide resolved
lib/src/main/scala/com/worksap/nlp/uzushio/lib/filters/NoContentDOM.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there plans for these lists to grow further? If its the case, probably it would be better to move to algorithms/data structures for partial match selection which do not depend on the size of the word list linearly (e.g. using tries).
For the current length the current version is still feasible though.
lib/src/main/scala/com/worksap/nlp/uzushio/lib/filters/NoContentDOM.scala
Outdated
Show resolved
Hide resolved
lib/src/main/scala/com/worksap/nlp/uzushio/lib/filters/NoContentDOM.scala
Outdated
Show resolved
Hide resolved
lib/src/main/scala/com/worksap/nlp/uzushio/lib/filters/NoContentDOM.scala
Show resolved
Hide resolved
lib/src/main/scala/com/worksap/nlp/uzushio/lib/filters/NoContentDOM.scala
Outdated
Show resolved
Hide resolved
Maybe, class/id-based partial matching is almost satisfied. |
lib/src/main/scala/com/worksap/nlp/uzushio/lib/filters/NoContentDOM.scala
Outdated
Show resolved
Hide resolved
} | ||
|
||
def partialMatchClasses(css: PathSegment): Boolean = { | ||
filteringPartialMatchClassOrIdNames.exists(name => css.lowerClasses.exists(_.contains(name))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although these codes may be computationally expensive, I can't catch a good idea.
Please, give me a good solution if you have one.
I enriched NoContentFilter.
The filtering DOM, classes, and ids criteria were determined by analyzing filter results of
filter=LargeFreqParagrap
andfilter=null
.