Closed msxingpeng closed 1 year ago
Thank you for pointing this out.
At the moment, I cannot access any version (even the newest one) on the official website: https://stanfordnlp.github.io/CoreNLP/history.html
I suspect this might be a temporary issue, or, if they do restructure the links, I can update the code once a new download link becomes available.
For now, I would wait a bit to see if the website gets fixed/updated. If it stays unavailable, one option might be to use alternative sources such as: https://central.sonatype.com/artifact/edu.stanford.nlp/stanford-corenlp/
For reference, the code currently uses version 3.6.0.
Stanford website says The resource you are trying to reach is not available due to SRCF datacenter shutdown and the corresponding servers being hosted there. The outage is expected to be between Jun 24th to July 3rd. https://cs.stanford.edu/srcf_404
The http://nlp.stanford.edu/software/stanford-corenlp-full-2015-12-09.zip is still not available. Is there any other solution?
Seems that the package is mirrored on maven https://repo1.maven.org/maven2/edu/stanford/nlp/stanford-corenlp/3.6.0/ (need to check if that can be used directly). Another option would be to migrate Spice to the latest version (hosted on huggingface) https://huggingface.co/stanfordnlp/CoreNLP/tree/main
Here is a temporary solution that downloads the required files from the Maven resources.
Just execute the following code in an environment where you installed pycocoevalcap
.
import os
from urllib.request import urlretrieve
from pycocoevalcap.spice.get_stanford_models import SPICELIB, JAR, SPICEDIR, print_progress
os.makedirs(os.path.join(SPICEDIR, SPICELIB), exist_ok=True)
base_url = f'https://repo1.maven.org/maven2/edu/stanford/nlp/stanford-corenlp/3.6.0/{JAR}'
target_name = os.path.join(SPICEDIR, SPICELIB, JAR)
for filef in ['{}.jar', '{}-models.jar']:
url = filef.format(base_url)
target_file = filef.format(target_name)
urlretrieve(url, filename=target_file, reporthook=print_progress)
It seems to be working again so I am closing this issue.
Hi,
In SPICE metric, it requires http://nlp.stanford.edu/software/stanford-corenlp-full-2015-12-09.zip in the code:
https://github.com/salaniz/pycocoevalcap/blob/a24f74c408c918f1f4ec34e9514bc8a76ce41ffd/spice/get_stanford_models.py#L26
However, due to some website re-org, the http://nlp.stanford.edu/software/stanford-corenlp-full-2015-12-09.zip is not accessible anymore.
Do you have any plans for workaround?