2013-02-22 75 views
-1

我只是嘗試編譯生成文件,但它沒有工作, 我的Makefile是這樣的,英尺-models.out生成文件錯誤

這對我來說很重要,我會上傳和發佈鏈接的所有文件夾, 如果任何人都可以幫助我,可能他會去天堂:D 這是我的所有文件夾的鏈接, 任何人都可以在LINUX上運行此代碼? http://s2.dosya.tc/server/OfLhtU/Desktop.zip.html

TRAIN=correctparses_03.txt.gz 
TEST=test.1.2.dis.gz 
FST=tfeatures.fst turknum.fst turkunk.fst unknown.fst 
SCRIPTS=lookup dlist script.txt singleline.pl merge.pl features.pl ft-models.pl   ft-model-eval.pl 
LIBS = -L"/usr/include/glib-2.0" -lglib 

all: eval.out 

eval.out: test.features.gz ft-model-eval.pl ft-models.out 
@echo === Evaluating the disambiguation model 
zcat $< | ft-model-eval.pl -v > [email protected] 2> eval.err 
tail -5 eval.err 

test.features.gz: test.merge.gz features.pl 
@echo === Preparing testing features for a +-2 word window 
zcat $< | features.pl | gzip > [email protected] 

test.merge.gz: ${TEST} test.lookup.gz merge.pl 
@echo === Merging answers in testing file with lookup results 
merge.pl 'zcat ${TEST} |' 'zcat test.lookup.gz |' 2> [email protected] | gzip > [email protected] 

test.lookup.gz: ${TEST} ${FST} script.txt singleline.pl lookup 
@echo === Running lookup on the testing file 
zcat $< | awk '{print $$1}' | lookup -f script.txt | singleline.pl | gzip > [email protected] 

ft-models.out: ft-models.pl dlist train.features.gz 
@echo === Training individual feature models 
ft-models.pl 'zcat train.features.gz |' 

train.features.gz: train.merge.gz features.pl 
@echo === Preparing training features for a +-2 word window 
zcat $< | features.pl | gzip > [email protected] 

train.merge.gz: ${TRAIN} train.lookup.gz merge.pl 
@echo === Merging answers in training file with lookup results 
merge.pl 'zcat ${TRAIN} |' 'zcat train.lookup.gz |' 2> [email protected] | gzip > [email protected] 

train.lookup.gz: ${TRAIN} ${FST} script.txt singleline.pl lookup 
@echo === Running lookup on the training file 
zcat $< | awk '{print $$1}' | lookup -f script.txt | singleline.pl | gzip > [email protected] 

clean: 
-rm train.lookup.gz 
-rm train.merge.gz train.merge.gz.err 
-rm train.features.gz 
-rm -rf ft-models.out 
-rm test.lookup.gz 
-rm test.merge.gz tst.merge.gz.err 
-rm test.features.gz 
-rm dlist.{dbg,tst,trn,val} 
-rm eval.{out,err} 


# To compile the dlist decision list induction program: 

# CC=gcc 
# CFLAGS=-O3 -Wall -I. `pkg-config --cflags glib-2.0` 
# LIBS=`pkg-config --libs glib-2.0` 

# dlist: dlist.o glib-ext.o 
# $(CC) $(CFLAGS) $^ $(LIBS) -o [email protected] 

# dlist.o: dlist.c glib-ext.h 

# glib-ext.o: glib-ext.c glib-ext.h 
當我運行這個make文件中的錯誤是

;

make: ft-models.pl: Command not found 
make: *** [ft-models.out] Error 127 

我該如何解決?謝謝...

第一個錯誤其實這

=== Running lookup on the testing file 
zcat test.1.2.dis.gz | awk '{print $1}' | lookup -f script.txt | singleline.pl | gzip > test.lookup.gz 
/bin/sh: 1: lookup: not found 
/bin/sh: 1: singleline.pl: not found 
=== Merging answers in testing file with lookup results 
merge.pl 'zcat test.1.2.dis.gz |' 'zcat test.lookup.gz |' 2> test.merge.gz.err | gzip  > test.merge.gz 
=== Preparing testing features for a +-2 word window 
zcat test.merge.gz | features.pl | gzip > test.features.gz 
/bin/sh: 1: features.pl: not found 
=== Running lookup on the training file 
zcat correctparses_03.txt.gz | awk '{print $1}' | lookup -f script.txt | singleline.pl | gzip > train.lookup.gz 
/bin/sh: 1: singleline.pl: not found 
/bin/sh: 1: lookup: not found 
=== Merging answers in training file with lookup results 
merge.pl 'zcat correctparses_03.txt.gz |' 'zcat train.lookup.gz |' 2> train.merge.gz.err | gzip > train.merge.gz 
=== Preparing training features for a +-2 word window 
zcat train.merge.gz | features.pl | gzip > train.features.gz 
/bin/sh: 1: features.pl: not found 
=== Training individual feature models 
./ft-models.pl 'zcat train.features.gz |' 
Finding unique morphological features in data 
Found 0 morphological features 
=== Evaluating the disambiguation model 
zcat test.features.gz | ft-model-eval.pl -v > eval.out 2> eval.err 
make: *** [eval.out] Error 127 
+0

這是後來的第一個錯誤給出了一個類似於我寫的錯誤 – user2100819 2013-02-23 14:17:13

回答

0

它可能需要幾個步驟來解決這個問題。第28行,改變這種:

ft-models.pl ... 

這樣:

./ft-models.pl ... 

告訴我們的結果(在這個答案的註釋)。

編輯:

好!現在對線20和36,更改此:

merge.pl ... 

這樣:

./merge.pl ... 

,告訴我們發生了什麼。

+0

改變了一些東西......! ===培訓單個功能模型 ./ft-models.pl'zcat train.features.gz |' 找到數據中獨特的形態特徵 找到0個形態特徵 ===評估消歧模型 zcat test.features.gz | ft-model-eval.pl -v> eval.out 2> eval.err make:*** [eval.out]錯誤127 – user2100819 2013-02-23 13:59:11

+0

我在第一次寫錯誤。看我的編輯 – user2100819 2013-02-23 14:05:26

+0

/bin/sh:1 :merge.pl:找不到 – user2100819 2013-02-23 14:18:41