sentence-compression's People
Forkers
anukat2015 nhittt iamgr007 ymfa ngocphuongnb dodocho zawecha1 zxsted bcmi220 xueweixianshengsentence-compression's Issues
Class not found exception
Hello,
I installed CPLEX on my machine and I tried to run the sentence-compression code by typing (after modifying the paths in the compress file and reducing the required memory from 10g to 1g):
./compress -i ./sample_sentence.txt -q -t 100
Unfortunately I got the following message:
java -Xmx1g -Djava.library.path= -classpath ./bin:./lib/stanford-parser.jar:./lib/berkeleylm.jar:/opt/ibm/ILOG/CPLEX_Studio_Community1262/cplex/lib/cplex.jar research.compression.SentenceCompressor -tweet -in=sample_sentence.txt -lm=
Exception in thread "main" java.lang.NoClassDefFoundError: research/compression/SentenceCompressor
Caused by: java.lang.ClassNotFoundException: research.compression.SentenceCompressor
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: research.compression.SentenceCompressor. Program will exit.
I am not an expert of Java and I do not know how to fix this. Since I think the sentence compression algorithm implemented in this code is cool, could someone help me please? MANY thanks in advance!
String index out of range: -1
Hello,
I have been able to compile the code and run the "compress" script. I also downloaded a language model from (as it seems to do not be provided in this package):
http://cmusphinx.sourceforge.net/wiki/download
When I type in a terminal:
./compress -i ./sample_sentence.txt -l ./cmusphinx-5.0-en-us.lm
I get the following error:
java -Xmx1g -Djava.library.path= -classpath ./bin:./lib/stanford-parser.jar:./lib/berkeleylm.jar:/opt/ibm/ILOG/CPLEX_Studio_Community1262/cplex/lib/cplex.jar research.compression.SentenceCompressor -in=./sample_sentence.txt -lm=./cmusphinx-5.0-en-us.lm
Loading parser from serialized file /home/sellier/pippo/sentence-compression-master/bin/research/lib/englishPCFG.ser.gz ... done [1.2 sec].
1 sents loaded
Loading language model from ./cmusphinx-5.0-en-us.lm
Error: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1911)
at edu.berkeley.nlp.lm.io.ArpaLmReader.parseLine(ArpaLmReader.java:170)
at edu.berkeley.nlp.lm.io.ArpaLmReader.parseNGrams(ArpaLmReader.java:146)
at edu.berkeley.nlp.lm.io.ArpaLmReader.parse(ArpaLmReader.java:78)
at edu.berkeley.nlp.lm.io.ArpaLmReader.parse(ArpaLmReader.java:18)
at edu.berkeley.nlp.lm.io.LmReaders.firstPassCommon(LmReaders.java:522)
at edu.berkeley.nlp.lm.io.LmReaders.firstPassArpa(LmReaders.java:499)
at edu.berkeley.nlp.lm.io.LmReaders.readArrayEncodedLmFromArpa(LmReaders.java:168)
at edu.berkeley.nlp.lm.io.LmReaders.readArrayEncodedLmFromArpa(LmReaders.java:148)
at edu.berkeley.nlp.lm.io.LmReaders.readArrayEncodedLmFromArpa(LmReaders.java:143)
at research.lib.MyBerkeleyLm.readLmFromFile(Unknown Source)
at research.lib.MyBerkeleyLm.(Unknown Source)
at research.compression.SentenceCompressor.initialize(Unknown Source)
at research.compression.SentenceCompressor.main(Unknown Source)
Can someone help me to fix this problem? Am I doing something wrong?
Many thanks in advance!
Exception: ilog/concert/IloException
Hi,
I used cmusphinx-5.0-en-us.lm as a language model. Hopefully it can work too. I also download IBM ILOG CPLEX Optimization Studio 12.6.3 (the newest version). When I run my program, I have the following error:
./compress -i ./sample_sentence.txt -l cmusphinx-5.0-en-us_fixed.lm
java -Xmx10g -Djava.library.path=$/Users/liqun/Applications/IBM/ILOG/CPLEX_Studio_Community1263/cplex/bin/x86-64_osx/ -classpath ./bin:./lib/stanford-parser.jar:./lib/berkeleylm.jar:$/Users/liqun/Applications/IBM/ILOG/CPLEX_Studio_Community1263/cplex/lib/cplex.jar research.compression.SentenceCompressor -in=./sample_sentence.txt -lm=cmusphinx-5.0-en-us_fixed.lm
Loading parser from serialized file /Users/liqun/Documents/workspace/LM/bin/research/lib/englishPCFG.ser.gz ... done [1.1 sec].
1 sents loaded
Loading language model from cmusphinx-5.0-en-us_fixed.lm
Exception in thread "main" java.lang.NoClassDefFoundError: ilog/concert/IloException
at research.compression.SentenceCompressor.initialize(SentenceCompressor.java:139)
at research.compression.SentenceCompressor.main(SentenceCompressor.java:58)
Caused by: java.lang.ClassNotFoundException: ilog.concert.IloException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
I have tried to fix these bugs for a long time. Could you please give some suggestions on how to fix these bugs? By the way, I am using the trial version. Do I need to buy the full production? Also, could you tell me which version of cplex you have used?
Thank you again! This would be so helpful for my research.
language models
I am trying to run this code by following the example reported in the manual (README file):
java -Xms2g -Xmx10g -Djava.library.path=$ILOG -cp bin:lib/berkeleylm.jar:lib/cplex.jar:lib/stanford-parser.jar research.compression.SentenceCompressor -in=data/sample_text -lm=gigaword.kn3.gz
Where can I find the language model file "gigaword.kn3.gz" mentioned in the above command?
Thanks!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.