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

PySpark support for core AUT functionality. #12, #13. #100

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4b46c1f
copy over scala code to new directory for pyspark
Sep 28, 2017
23129e8
Merge remote-tracking branch 'upstream/master'
Oct 3, 2017
2ea2d69
add pyspark files
Oct 18, 2017
d1b2659
add spark-sql_2.11 dependency to pom.xml
Oct 18, 2017
6d940ce
Merge remote-tracking branch 'upstream/master'
Oct 18, 2017
f871b40
delete aut/python directory
Oct 20, 2017
7d1be99
add python files
Oct 20, 2017
8e2e436
remove extraneous pyspark directory
Oct 20, 2017
a40d93e
add RecordLoaderPythonHelper.scala
Oct 20, 2017
1133c9f
Merge remote-tracking branch 'upstream/master'
Oct 20, 2017
e1b1ad4
remove runpyspark script
Oct 20, 2017
bfb2678
fix some typos and add two example scripts
Oct 20, 2017
c8a29f8
delete some commented out code
Oct 22, 2017
b8629ea
remove unneeded TODOs
Oct 22, 2017
1845d34
remove python scripts
Oct 23, 2017
a6de005
Merge remote-tracking branch 'upstream/master'
Oct 30, 2017
ed1bd88
remove loadArc and loadWarc
Oct 30, 2017
79e7475
Removes old RecordRDD call
ianmilligan1 Nov 20, 2017
7118169
Updated urlparse call for Python 3 support
ianmilligan1 Nov 21, 2017
e292af2
Merge branch 'master' into master
greebie Nov 23, 2017
bafa23f
- Remove errant type reference in DetectLanguage
greebie Nov 23, 2017
8c5fb17
Merge branch 'master' into master
greebie Nov 23, 2017
9731e25
Fix bug with keepContent using re.search instead re.match.
greebie Nov 23, 2017
f9fa7ab
Merge branch 'master' of https://github.com/MapleOx/aut
greebie Nov 23, 2017
9e23524
Swapped match for search in DFTransformations.py
ianmilligan1 Nov 24, 2017
d3859c2
Include git search instead of replace on RowTransformations as well.
greebie Nov 24, 2017
58fb708
removed _java2py import
ianmilligan1 Nov 28, 2017
c569d6a
Merge branch 'master' into master
greebie Nov 30, 2017
85fade6
Merge remote-tracking branch 'upstream/master'
ianmilligan1 Dec 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Include git search instead of replace on RowTransformations as well.
  • Loading branch information
greebie committed Nov 24, 2017
commit d3859c21d63a39772d3235678fea71833da191c7
11 changes: 4 additions & 7 deletions src/main/python/ExtractDomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,18 @@
from urllib.parse import urlparse

def ExtractDomain(url, source = ""):
if url is None:
if url is None:
return None
host = None
try:
host = urlparse(url).hostname
except Exception as e:
# it's okay
pass
if (host is not None or source == ""):
# it's okay
pass
if (host is not None or source == ""):
return host
try:
host = urlparse(source).hostname
return host
except Exception as e:
return None



4 changes: 2 additions & 2 deletions src/main/python/RowTransformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def keepUrls(row, urls):
def keepUrlPatterns(row, urlREs):
url = row['url']
for pattern in urlREs:
if re.match(pattern, url) is not None:
if re.search(pattern, url) is not None:
return True
return False

Expand All @@ -67,7 +67,7 @@ def keepLanguages(row, langs):
def keepContent(row, contentREs):
contents = row['contentString']
for pattern in contentREs:
if re.match(pattern, contents) is not None:
if re.search(pattern, contents) is not None:
return True
return False

Expand Down