Documentation
¶
Overview ¶
Package bridge는 유사도가 높은데 링크가 없는 문서 쌍을 찾아 관계를 축으로 한 재발견을 돕는다. 후보와 근거만 내고 문장은 만들지 않는다. ADR 0028. 단어 축과 임베딩 축을 각각 자기 하한으로 걸러 합집합으로 낸다. ADR 0075.
Index ¶
Constants ¶
View Source
const ( AxisTerm = "term" AxisEmbed = "embed" )
축 식별자다. Pair.Axes 의 값이고 --json 출력에 그대로 나간다.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Min 은 단어 축의 코사인 하한이다.
Min float64
// EmbedMin 은 임베딩 축의 코사인 하한이다. 단어 축과 눈금이 다르므로
// 값을 공유하지 않는다(ADR 0075).
EmbedMin float64
// Limit 은 낼 쌍 수 상한이다. 음수면 제한 없다.
Limit int
// Vectors 는 색인 경로 기준 임베딩 벡터 맵이다. nil 이면 임베딩
// 축을 끄고 단어 축만 돈다. 맵에 문서가 빠져 있으면 그 문서는
// 임베딩 축 후보에서만 빠진다.
Vectors map[string][]float32
}
Options는 Run 의 인자다.
type Pair ¶
type Pair struct {
A string `json:"a"`
B string `json:"b"`
Score float64 `json:"score"`
Axes []string `json:"axes"`
// contains filtered or unexported fields
}
Pair는 후보 쌍 하나다. A와 B는 슬러그 오름차순으로 담는다.
Click to show internal directories.
Click to hide internal directories.