Skip to content

Commit 909a7b5

Browse files
committed
increase maximum search radius
1 parent 3e2e0f9 commit 909a7b5

File tree

1 file changed

+1
-1
lines changed
  • src/commonMain/kotlin/ai/hypergraph/kaliningraph/automata

1 file changed

+1
-1
lines changed

src/commonMain/kotlin/ai/hypergraph/kaliningraph/automata/FSA.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ open class FSA constructor(open val Q: TSA, open val init: Set<Σᐩ>, open val
163163
}
164164

165165
fun LED(cfg: CFG, brokeToks: Σᐩ): Int =
166-
(1 until MAX_RADIUS).firstOrNull { FSA.nonemptyLevInt(brokeToks, cfg, it) } ?: MAX_RADIUS
166+
(1 until (2 * MAX_RADIUS)).firstOrNull { FSA.nonemptyLevInt(brokeToks, cfg, it) } ?: (2 * MAX_RADIUS)
167167

168168
fun intersectPTree(str: Σᐩ, cfg: CFG, radius: Int): PTree? {
169169
// 1) Build the Levenshtein automaton (acyclic)

0 commit comments

Comments
 (0)