feat(desktop): typo auto-correct and context-aware sentence prediction
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Has been cancelled
deploy-site / deploy (push) Has been cancelled
ci / 워크스페이스 빌드 검증 (push) Has been cancelled
ci / 모바일 린트·타입·Jest (push) Has been cancelled
ci / Supabase Edge Functions + Cloudflare Worker (push) Has been cancelled
ci / .NET API 서버 테스트 (push) Has been cancelled
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Has been cancelled
deploy-site / deploy (push) Has been cancelled
ci / 워크스페이스 빌드 검증 (push) Has been cancelled
ci / 모바일 린트·타입·Jest (push) Has been cancelled
ci / Supabase Edge Functions + Cloudflare Worker (push) Has been cancelled
ci / .NET API 서버 테스트 (push) Has been cancelled
Typo auto-correct (INPUT-19) - TypoCorrectionService + core typo-correction: 2-set Korean layout mistypes both ways, always-wrong spellings, near-misses of the user's frequent words, optional model check re-validated in core; applied by backspace N + paste and cancelled on new keys or window change. Prediction quality (INPUT-20/21) - gemma models are sent raw with the user's unfinished sentence pre-filled into the model turn, so the model truly continues the text (mid-word joins and spacing exact). Other models keep the instruction prompt. - Context: text before the caret (opening lines and a fact list of names, dates, amounts outside the 400-char window), messages just sent in the same chat window (memory only, 30 min), personal-graph follow-ups and IDF-ranked related sentences with Korean stemming. - Guards: first sentence only, restated-prefix stripping (also fixes the instruction path), repeat drop, no invented dates/names/numbers (one retry), plain -다 register, no emoji unless the user uses them, search-box keywords. Fill loop mixes instruction prompts for variety. - Opt-in real-model probe: tests/integration/suggestion-quality.ollama.test.ts Suggestions now actually show up - Terminal (Claude Code): caret trust from the input line, not the whole screen (status line below the box blocked every keystroke); Korean composition counts as typing at the end; a grey placeholder filling the empty box at once is not user text. - Chrome: UIA focus flicker while typing no longer resets "edited". - KakaoTalk/RichEdit: trailing paragraph mark ignored for edit position and stripped so accepted text keeps its separating space. - While the overlay is visible the suggestion shortcuts are captured so Ctrl+Alt+Enter no longer also types a newline; released when hidden. - nut-js preloaded after boot (first accept waited 4.8 s).
This commit is contained in:
parent
5ca3709b32
commit
3cac14f668
56 changed files with 4700 additions and 258 deletions
|
|
@ -15,11 +15,27 @@ import {
|
|||
describe('extractTerms', () => {
|
||||
it('소문자화하고 조사/불용어를 걷어낸다', () => {
|
||||
const terms = extractTerms('오늘 회의에서 논의한 내용을 정리해서 공유드립니다')
|
||||
expect(terms).toContain('회의에서')
|
||||
expect(terms).toContain('정리해서')
|
||||
// 조사·'하다' 활용을 뗀 어간으로 남는다 — "회의에서" 와 "회의는" 이 같은 용어가 된다
|
||||
expect(terms).toContain('회의')
|
||||
expect(terms).toContain('정리')
|
||||
expect(terms).toContain('논의')
|
||||
expect(terms).not.toContain('회의에서')
|
||||
expect(terms).not.toContain('그리고')
|
||||
})
|
||||
|
||||
it('조사가 달라도 같은 주제의 문장은 용어를 공유한다', () => {
|
||||
const a = extractTerms('배포 일정은 금요일로 잡았습니다')
|
||||
const b = extractTerms('금요일 배포를 위해 테스트를 끝내야 합니다')
|
||||
expect(a).toContain('배포')
|
||||
expect(b).toContain('배포')
|
||||
expect(a).toContain('금요일')
|
||||
expect(b).toContain('금요일')
|
||||
})
|
||||
|
||||
it('남는 어간이 1자면 떼지 않는다 (회의·결과)', () => {
|
||||
expect(extractTerms('회의 결과')).toEqual(expect.arrayContaining(['회의', '결과']))
|
||||
})
|
||||
|
||||
it('영어 불용어를 제거한다', () => {
|
||||
const terms = extractTerms('Thanks for the quick turnaround on the report')
|
||||
expect(terms).toContain('quick')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue