8000 시간복잡도 문제 · Issue #116 · eubinecto/politely · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
시간복잡도 문제 #116
Open
Open
@eubinecto

Description

@eubinecto

politely/politely/styler.py

Lines 149 to 159 in eb1df8e

candidates = itertools.product(
*[
pair2honorifics.get(
pair,
{
pair,
},
)
for pair in self.out.split(SEP) # SEP
]
)

여기서 Cartesian product를 계산하면 문장이 길어짐에 따라 시간이 기하급수적으로 늘어난다.
이 효율성을 해결해야한다.
비테르비 알고리즘을 쓴다던지.... 해야하지 않을까.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0