Giter Site home page Giter Site logo

segphrase's People

Contributors

paperplanet avatar remenberl avatar shangjingbo1226 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

segphrase's Issues

how to calculate recall in pooling evaluation?

Randomly sampled k Wiki-uncovered phrases from the returned candidates,and rely on human evaluators to get how many quality phrases. But i don't know the total number of quality phrases,then what's the recall mean here?

Using SegPhrase on other text corpus

I am trying to run SegPhrase on a dataset of Academic papers on bioengineering. Each line of the of the data is one paper. I have changed to the train_toy.sh file's RAW_TEXT to be my new dataset. The rest it kept the same.

When, however, I run the training, it fail's with the following messages.

Sentences = 79178

tokens = 532593

of distinct tokens = 12633

of frequent pattern = 11862

feature extraction done.
===Auto Label Enable===
Traceback (most recent call last):
File "src/classification/auto_label_generation.py", line 112, in
kmeans.fit(matrixOther)
File "/home/apps/python/python-2.7.9/lib/python2.7/site-packages/sklearn/cluster/k_means_.py", line 1235, in fit
X = check_array(X, accept_sparse="csr", order='C', dtype=np.float64)
File "/home/apps/python/python-2.7.9/lib/python2.7/site-packages/sklearn/utils/validation.py", line 398, in check_array
_assert_all_finite(array)
File "/home/apps/python/python-2.7.9/lib/python2.7/site-packages/sklearn/utils/validation.py", line 54, in _assert_all_finite
" or a value too large for %r." % X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
[Warning] failed to open data/wiki.label.auto under parameters = r
./train_ChipSeq.sh: line 52: 46775 Segmentation fault ./bin/predict_quality results/feature_table_0.csv ${DATA_LABEL} results/ranking.csv outsideSentence,log_occur_feature,constant,frequency 0 TRAIN results/random_forest_0.model

Sentences = 88897

Unigrams = 15865

[Warning] failed to open results/ranking.csv under parameters = r
./train_ChipSeq.sh: line 58: 46778 Segmentation fault ./bin/adjust_probability tmp/sentences.buf ${OMP_NUM_THREADS} results/ranking.csv results/patterns.csv ${DISCARD_RATIO} ${MAX_ITERATION} ./results/ ${DATA_LABEL} ./results/penalty.1
[Warning] failed to open ./results/penalty.1 under parameters = r
./train_ChipSeq.sh: line 61: 46782 Segmentation fault ./bin/recompute_features results/iter${MAX_ITERATION_1}_discard${DISCARD_RATIO}/length results/feature_table_0.csv results/patterns.csv tmp/sentencesWithPunc.buf results/feature_table_1.csv ./results/penalty.1 1
[Warning] failed to open data/wiki.label.auto under parameters = r
./train_ChipSeq.sh: line 62: 46783 Segmentation fault ./bin/predict_quality results/feature_table_1.csv ${DATA_LABEL} results/ranking_1.csv outsideSentence,log_occur_feature,constant,frequency 0 TRAIN results/random_forest_1.model
[Warning] failed to open results/ranking_1.csv under parameters = r
./train_ChipSeq.sh: line 63: 46784 Segmentation fault ./bin/adjust_probability tmp/sentences.buf ${OMP_NUM_THREADS} results/ranking_1.csv results/patterns.csv ${DISCARD_RATIO} ${MAX_ITERATION} ./results/1. ${DATA_LABEL} ./results/penalty.2
[Warning] failed to open ./results/penalty.2 under parameters = r
./train_ChipSeq.sh: line 66: 46788 Segmentation fault ./bin/build_model results/1.iter${MAX_ITERATION_1}_discard${DISCARD_RATIO}/ 6 ./results/penalty.2 results/segmentation.model
===Unigram Disable===
[Warning] failed to open results/1.iter6_discard0.00//length1.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length2.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length3.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length4.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length5.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length6.csv under parameters = r
Traceback (most recent call last):
File "src/postprocessing/filter_by_support.py", line 37, in
main(sys.argv[1:])
File "src/postprocessing/filter_by_support.py", line 17, in main
for line in open(segmented_corpus_filename):
IOError: [Errno 2] No such file or directory: 'results/1.iter5_discard0.00/segmented.txt'

I speculate maybe the each data,i.e. paper, is too long to parse?

What do you suggest I do in order to use SegPhrase on this dataset.

Also may I ask, for the train_dblp.sh, how did you collect or obtain the DBLP.label?

I figure it will provide a higher quality phrases when labels are provide rather than enabling Auto Label feature.

resource of wiki quality terms

Can you tell me where to find wiki quality terms (wiki_labels_quality.txt)? I would like to try different language such as Vietnamese or German.

Tain-toy.sh

Hello,

Please when i execute train-toy.sh i have this error:

[Warning] failed to open results/patterns.csv under parameters = r

Could you help me please?

License?

Hi guys,

Did you intend this project to be open source? If so, would you consider adding a license?

-Taylor

how to allow numerals in phrases?

By default it seems that the preprocessing removes number and symbol characters from the training text.

I would like disable that step so I can discover common phrases like iphone_7, _2%milk, and 6_pack.

Could you please point me to the string processing code that is removing number and symbol characters?

Unable to download the DBLP.txt.gz dataset

"The requested URL /data/DBLP.txt.gz was not found on this server." Can you please update the link? Thanks.

===Downloading dataset===
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 313 100 313 0 0 591 0 --:--:-- --:--:-- --:--:-- 591

<title>404 Not Found</title>

Not Found

The requested URL /data/DBLP.txt.gz was not found on this server.


Apache/2.2.15 (Scientific Linux) Server at dmserv2.cs.illinois.edu Port 80

Problem with makefile

Hello, when i type in cmd make i have errors.

-pthread -lm -Wno-unused-result -Wno-sign-compare -Wno-unused-variable -Wno-par
entheses -Wno-format -o bin/from_raw_to_binary src/preprocessing/from_raw_to_bin
ary.cpp, ...) failed.

Could you help me please

Error in train_dblp.sh

I install the requirements and the run ./train_dblp.sh, but I got the following error. Do I assume to do anything before running the ./train_dblp.sh ?

./train_dblp.sh: line 5: type: pypy: not found
# Sentences = 9790215
# tokens =  103956084
./train_dblp.sh: line 43: 13907 Killed                  ${PYPY} ./src/frequent_phrase_mining/main.py -thres ${SUPPORT_THRESHOLD} -o ./results/patterns.csv -raw ${RAW_TEXT}
[Warning] failed to open results/patterns.csv under parameters = r
./train_dblp.sh: line 47: 13936 Segmentation fault      (core dumped) ./bin/feature_extraction tmp/sentencesWithPunc.buf results/patterns.csv ${STOPWORD_LIST} results/wordIDF.txt results/feature_table_0.csv
===Auto Label Disable===
320 labels loaded
[Warning] failed to open results/feature_table_0.csv under parameters = r
./train_dblp.sh: line 58: 13938 Segmentation fault      (core dumped) ./bin/predict_quality results/feature_table_0.csv ${DATA_LABEL} results/ranking.csv outsideSentence,log_occur_feature,constant,frequency 0 TRAIN results/random_forest_0.model
# Sentences = 10576779
# Unigrams = 472557
[Warning] failed to open results/ranking.csv under parameters = r
./train_dblp.sh: line 64: 13942 Segmentation fault      (core dumped) ./bin/adjust_probability tmp/sentences.buf ${OMP_NUM_THREADS} results/ranking.csv results/patterns.csv ${DISCARD_RATIO} ${MAX_ITERATION} ./results/ ${DATA_LABEL} ./results/penalty.1
[Warning] failed to open ./results/penalty.1 under parameters = r
./train_dblp.sh: line 67: 13951 Segmentation fault      (core dumped) ./bin/recompute_features results/iter${MAX_ITERATION_1}_discard${DISCARD_RATIO}/length results/feature_table_0.csv results/patterns.csv tmp/sentencesWithPunc.buf results/feature_table_1.csv ./results/penalty.1 1
320 labels loaded
[Warning] failed to open results/feature_table_1.csv under parameters = r
./train_dblp.sh: line 68: 13953 Segmentation fault      (core dumped) ./bin/predict_quality results/feature_table_1.csv ${DATA_LABEL} results/ranking_1.csv outsideSentence,log_occur_feature,constant,frequency 0 TRAIN results/random_forest_1.model
[Warning] failed to open results/ranking_1.csv under parameters = r
./train_dblp.sh: line 69: 13955 Segmentation fault      (core dumped) ./bin/adjust_probability tmp/sentences.buf ${OMP_NUM_THREADS} results/ranking_1.csv results/patterns.csv ${DISCARD_RATIO} ${MAX_ITERATION} ./results/1. ${DATA_LABEL} ./results/penalty.2
[Warning] failed to open ./results/penalty.2 under parameters = r
./train_dblp.sh: line 72: 13960 Segmentation fault      (core dumped) ./bin/build_model results/1.iter${MAX_ITERATION_1}_discard${DISCARD_RATIO}/ 6 ./results/penalty.2 results/segmentation.model
===Unigram Disable===
[Warning] failed to open results/1.iter6_discard0.00//length1.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length2.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length3.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length4.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length5.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length6.csv under parameters = r
Traceback (most recent call last):
  File "src/postprocessing/filter_by_support.py", line 37, in <module>
    main(sys.argv[1:])
  File "src/postprocessing/filter_by_support.py", line 17, in main
    for line in open(segmented_corpus_filename):
IOError: [Errno 2] No such file or directory: 'results/1.iter5_discard0.00/segmented.txt'

Wikipedia labels

How did you select Wikipedia entity names in wiki_labels_quality out of all Wikipedia entity names in wiki_labels_all? In other words, what do you mean by "high quality" described in your README file? I do see relevant discussion in your paper. Or do I miss anything? Thanks!

对src/classification/aho_corasick.h的疑问

我使用aho_corasick.h进行测试

AhoCorasick ac_demo;
ac_demo.add("abc");
ac_demo.add("bc");
ac_demo.add("b");
ac_demo.make();
vector<pair<int, int>> ret;
ac_demo.search("abcx", ret);

只能匹配出abc和bc, 中间的b没有匹配出来
???

"ptr exceeds the dimension", then problem finishing running segphrase on DBLP.txt (but not others)

Hi,
I notice that when running train_dblp.sh with DBLP.txt as input, I get a message "ptr exceeds the dimension" that I don't get when running DBLP.5K.txt.

In predict quality, this assertion test is failing:
predict_quality.cpp: myAssert(ptr == dimension, "ptr exceeds the dimension");

Do you think that is the cause of the problem? Any idea why?

Thanks! screen output is below...

Sentences = 9790215

tokens = 103956084

of distinct tokens = 455340

of frequent pattern = 1940731

feature extraction done.
===Auto Label Disable===
320 labels loaded
feature dimension = 12
ptr exceeds the dimension

Sentences = 10576779

Unigrams = 472557

Segmentation fault
[Warning] failed to open ./results/penalty.1 under parameters = r
Segmentation fault
320 labels loaded
[Warning] failed to open results/feature_table_1.csv under parameters = r
Segmentation fault
Segmentation fault
[Warning] failed to open ./results/penalty.2 under parameters = r
Segmentation fault
===Unigram Disable===
[Warning] failed to open results/1.iter6_discard0.00//length1.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length2.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length3.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length4.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length5.csv under parameters = r
[Warning] failed to open results/1.iter6_discard0.00//length6.csv under parameters = r
Traceback (most recent call last):
File "app_main.py", line 72, in run_toplevel
File "src/postprocessing/filter_by_support.py", line 37, in
main(sys.argv[1:])
File "src/postprocessing/filter_by_support.py", line 17, in main
for line in open(segmented_corpus_filename):
IOError: [Errno 2] No such file or directory: 'results/1.iter5_discard0.00/segmented.txt'

My results directory looks like this:
-rw-rw---- 1 tcassidy tcassidy 0 Jul 28 14:32 unified.csv
-rw-rw---- 1 tcassidy tcassidy 164M Jul 28 14:29 feature_table_0.csv
-rw-rw---- 1 tcassidy tcassidy 13M Jul 28 14:11 wordIDF.txt
-rw-rw---- 1 tcassidy tcassidy 41M Jul 28 14:10 patterns.csv

Add constraints in segmentation (postags, hardcoded constraints, etc.)

Apply Part-Of-Speech tags to restrict the patterns of phrases.
Examples:
(1) Only Noun phrases
(2) RB + ADJ
(3) Verb phrases can have preposition part inside

Design: Change transition probabilities inside dynamic programming.
How to apply this constraints? (Use a [0, 1] score?)

Can it run with Vietnamese corpus?

I have appended a short text in Vietnamese in "DBLP.5K.txt" but it went wrong with those words when I ran train_toy.sh. I don't know why it cannot read Vietnamese words, such as
_"ngành" becomes "ng" and "nh" (2 words) in the result, all letters with signs will be disappeared

ld: symbol(s) not found for architecture x86_64

Hi,
I'm using mac and I haven't dealing with any c++ environment setting before.
At first when I tried to run Make in command line, I got error: ld: library not found for -lgomp
Then, I tried installing ld and gcc4.9 by macport, and it somehow gave me new error:
ld: symbol(s) not found for architecture x86_64
How can I solved it, or I can run the code in other way?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.