Skip to content
Browse files

Fixed termination step in extract-best-path().

  • Loading branch information...
1 parent c9cd04c commit 2e869fb1e342a2899419f0ef1a75da3f424560a2 @julosaure committed
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/decloder/translator.clj
View
8 src/decloder/translator.clj
@@ -101,11 +101,7 @@
(if (= 0 (count ((model :lex-prob) src-token)))
- ;(if (= 0 (count (filter #(= (first (key %)) src-token) (model :lex-prob))))
- (do
- ;(println "(model :lex-prob) " (take 5 (model :lex-prob)))
- ;(println "count filter 0" (count (filter #(= (first (key %)) src-token) (model :lex-prob))))
- (recur (rest src-sentence_) (+ pos 1) stacks))
+ (recur (rest src-sentence_) (+ pos 1) stacks)
(if (= pos 0)
@@ -165,7 +161,7 @@
(recur (- cpt 1))
(loop [hypo (key (first cur-stack))
best-path []]
- (if (nil? hypo)
+ (if (nil? (:pred hypo))
best-path
(do
;(println "c" best-path)

0 comments on commit 2e869fb

Please sign in to comment.
Something went wrong with that request. Please try again.