mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Improve floret vectors display in pipeline docs (#11343)
This commit is contained in:
parent
3e4cf1bbe1
commit
04c6e5cb95
|
@ -114,7 +114,11 @@ function formatVectors(data) {
|
|||
if (!data) return 'n/a'
|
||||
if (Object.values(data).every(n => n === 0)) return 'context vectors only'
|
||||
const { keys, vectors, width } = data
|
||||
return `${abbrNum(keys)} keys, ${abbrNum(vectors)} unique vectors (${width} dimensions)`
|
||||
if (keys >= 0) {
|
||||
return `${abbrNum(keys)} keys, ${abbrNum(vectors)} unique vectors (${width} dimensions)`
|
||||
} else {
|
||||
return `${abbrNum(vectors)} floret vectors (${width} dimensions)`
|
||||
}
|
||||
}
|
||||
|
||||
function formatAccuracy(data, lang) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user