Skip to content
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

DomainFrequencyExtractor should remove WWW prefix #456

Closed
ruebot opened this issue Apr 27, 2020 · 0 comments · Fixed by #457
Closed

DomainFrequencyExtractor should remove WWW prefix #456

ruebot opened this issue Apr 27, 2020 · 0 comments · Fixed by #457
Assignees

Comments

@ruebot
Copy link
Member

ruebot commented Apr 27, 2020

Currently the DomainFrequencyExtractor does not remove the WWW prefix. We should include RemovePrefixWWWDF as well.

def apply(d: DataFrame): Dataset[Row] = {
val spark = SparkSession.builder().master("local").getOrCreate()
// scalastyle:off
import spark.implicits._
// scalastyle:on
d.groupBy(ExtractDomainDF($"url").as("domain"))
.count()
.sort($"count".desc)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant