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

JDK #22

Open
MMariaJ opened this issue Nov 17, 2020 · 2 comments
Open

JDK #22

MMariaJ opened this issue Nov 17, 2020 · 2 comments

Comments

@MMariaJ
Copy link

MMariaJ commented Nov 17, 2020

Hi Alex,

I had the same issue as zeeshansayyed when running MPEDS on a Windows system- I'm using Git Bash. From reading the previous thread, however, I can't tell if the issue has been resolved.

Would you know something I can try? I'm hoping to use MPEDS for my dissertation.

Thanks.

@alexhanna
Copy link
Member

I think the issue with the JDK has been resolved. CLIFF needs the JDK to run.

To get it started without geolocation, you could try commenting out

cliff:
image: cliff:2.3.0
build: ./cliff
ports:
- "8080:8080"
and

mpeds/docker-compose.yml

Lines 11 to 12 in 73d9fe9

depends_on:
- cliff

@rahulbot has made it really easy to set up a CLIFF container too: https://github.com/mediacloud/cliff-docker, so after you set those up, you could change

def __init__(self, cliff_url = 'cliff:8080/CLIFF-2.3.0'):
to point to your localhost or a cloud VM.

@MMariaJ
Copy link
Author

MMariaJ commented Nov 23, 2020

Hi Alex.

Thanks a lot for your reply. I've managed to connect mpeds with rahulbot's cliff. However, I've run into issues when executing example-lexisnexis.py. Do you have any suggestions?

` File "example-lexisnexis.py", line 36, in
df_protest['smo'] = mobj.getSMO(df_protest['TEXT'])

File "/src/mpeds/classify_protest.py", line 321, in getSMO
SMOs = text.apply(self.smo_clf.getSMO, args = [True])

File "/usr/lib64/python2.7/site-packages/pandas/core/series.py", line 2355, in apply
mapped = lib.map_infer(values, f, convert=convert_dtype)

File "pandas/_libs/src/inference.pyx", line 1569, in pandas._libs.lib.map_infer (pandas/_libs/lib.c:66440)

File "/usr/lib64/python2.7/site-packages/pandas/core/series.py", line 2342, in
f = lambda x: func(x, *args, **kwds)

File "/src/mpeds/open_ended_coders.py", line 543, in getSMO
tokens = self.STANFORD_TOKENIZER.tokenize(text)

File "/usr/lib/python2.7/site-packages/nltk/tokenize/stanford.py", line 87, in tokenize
return self._parse_tokenized_output(self._execute(cmd, s))

File "/usr/lib/python2.7/site-packages/nltk/tokenize/stanford.py", line 113, in _execute
cmd, classpath=self._stanford_jar, stdout=PIPE, stderr=PIPE

File "/usr/lib/python2.7/site-packages/nltk/internals.py", line 112, in java
subprocess_output_dict = {'pipe': subprocess.PIPE, 'stdout': subprocess.STDOUT, 'devnull': subprocess.DEVNULL}

AttributeError: 'module' object has no attribute 'DEVNULL'
`

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

No branches or pull requests

2 participants