mpeds icon indicating copy to clipboard operation
mpeds copied to clipboard

JDK

Open MMariaJ opened this issue 5 years ago • 2 comments

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.

MMariaJ avatar Nov 17 '20 08:11 MMariaJ

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 https://github.com/MPEDS/mpeds/blob/73d9fe9563227715dbe6f558e531f55050cf58bb/docker-compose.yml#L3-L7 and https://github.com/MPEDS/mpeds/blob/73d9fe9563227715dbe6f558e531f55050cf58bb/docker-compose.yml#L11-L12

@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 https://github.com/MPEDS/mpeds/blob/73d9fe9563227715dbe6f558e531f55050cf58bb/mpeds/mpeds/open_ended_coders.py#L333 to point to your localhost or a cloud VM.

alexhanna avatar Nov 17 '20 22:11 alexhanna

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' `

MMariaJ avatar Nov 23 '20 19:11 MMariaJ