Fix types descriptions of sm and sent models (#9401)

This commit is contained in:
Adriane Boyd 2021-10-11 11:17:18 +02:00 committed by GitHub
parent a5231cb044
commit fd7edbc645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,7 @@ const MODEL_META = {
core_sm: 'Vocabulary, syntax, entities',
dep: 'Vocabulary, syntax',
ent: 'Named entities',
sent: 'Sentence boundaries',
pytt: 'PyTorch Transformers',
trf: 'Transformers',
vectors: 'Word vectors',
@ -195,6 +196,7 @@ const Model = ({
const [isError, setIsError] = useState(true)
const [meta, setMeta] = useState({})
const { type, genre, size } = getModelComponents(name)
const display_type = type === 'core' && size === 'sm' ? 'core_sm' : type
const version = useMemo(() => getLatestVersion(name, compatibility, prereleases), [
name,
compatibility,
@ -231,7 +233,7 @@ const Model = ({
const rows = [
{ label: 'Language', tag: langId, content: langName },
{ label: 'Type', tag: type, content: MODEL_META[type] },
{ label: 'Type', tag: type, content: MODEL_META[display_type] },
{ label: 'Genre', tag: genre, content: MODEL_META[genre] },
{ label: 'Size', tag: size, content: meta.sizeFull },
{ label: 'Components', content: components, help: MODEL_META.components },