Skip to content

Commit

Permalink
ditto for merge prob
Browse files Browse the repository at this point in the history
  • Loading branch information
lgessler committed Jun 22, 2022
1 parent 182568c commit d7ba27b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/new_segmenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export function Document(props) {
let className = "sentence"
const tokens = props.tokens.filter(t => t["token-type"] !== "super");
const firstToken = tokens && tokens.length > 0 && tokens[0]
const outProb = firstToken && firstToken.probas && firstToken.probas.O
const maybeMerge = outProb && outProb > SSPLIT_SUSPICIOUS_PROBABILITY_THRESHOLD
const beginProb = firstToken && firstToken.probas && firstToken.probas.B
const maybeMerge = beginProb && beginProb < SSPLIT_SUSPICIOUS_PROBABILITY_THRESHOLD
const isGold = firstToken.quality && firstToken.quality === "gold"
if (!isGold && maybeMerge) {
className += " sentence-maybe-merge"
Expand Down

0 comments on commit d7ba27b

Please sign in to comment.