mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Update website for v3 launch
This commit is contained in:
parent
e7db07a0b9
commit
1ed7029d47
|
@ -537,15 +537,17 @@ two major steps required:
|
|||
pass through the `nlp` pipeline.
|
||||
|
||||
<Project id="tutorials/rel_component">
|
||||
Run this example use-case by using our project template. It includes all the
|
||||
Run this example use-case by using our project template. It includes all the
|
||||
code to create the ML model and the pipeline component from scratch.
|
||||
It also contains two config files to train the model:
|
||||
It also contains two config files to train the model:
|
||||
one to run on CPU with a Tok2Vec layer, and one for the GPU using a transformer.
|
||||
The project applies the relation extraction component to identify biomolecular
|
||||
interactions in a sample dataset, but you can easily swap in your own dataset
|
||||
The project applies the relation extraction component to identify biomolecular
|
||||
interactions in a sample dataset, but you can easily swap in your own dataset
|
||||
for your experiments in any other domain.
|
||||
</Project>
|
||||
|
||||
<YouTube id="8HL-Ap5_Axo"></YouTube>
|
||||
|
||||
#### Step 1: Implementing the Model {#component-rel-model}
|
||||
|
||||
We need to implement a [`Model`](https://thinc.ai/docs/api-model) that takes a
|
||||
|
@ -824,7 +826,7 @@ will predict scores for each label. We add convenience methods to easily
|
|||
retrieve and add to them.
|
||||
|
||||
```python
|
||||
### The constructor (continued)
|
||||
### The constructor (continued)
|
||||
def __init__(self, vocab, model, name="rel"):
|
||||
"""Create a component instance."""
|
||||
# ...
|
||||
|
@ -1041,11 +1043,11 @@ def make_relation_extractor(nlp, name, model):
|
|||
```
|
||||
|
||||
<Project id="tutorials/rel_component">
|
||||
Run this example use-case by using our project template. It includes all the
|
||||
Run this example use-case by using our project template. It includes all the
|
||||
code to create the ML model and the pipeline component from scratch.
|
||||
It contains two config files to train the model:
|
||||
It contains two config files to train the model:
|
||||
one to run on CPU with a Tok2Vec layer, and one for the GPU using a transformer.
|
||||
The project applies the relation extraction component to identify biomolecular
|
||||
interactions, but you can easily swap in your own dataset for your experiments
|
||||
The project applies the relation extraction component to identify biomolecular
|
||||
interactions, but you can easily swap in your own dataset for your experiments
|
||||
in any other domain.
|
||||
</Project>
|
||||
|
|
|
@ -193,6 +193,8 @@ available for the different architectures are documented with the
|
|||
|
||||
</Infobox>
|
||||
|
||||
<YouTube id="BWhh3r6W-qE"></YouTube>
|
||||
|
||||
### Config lifecycle at runtime and training {#config-lifecycle}
|
||||
|
||||
A pipeline's `config.cfg` is considered the "single source of truth", both at
|
||||
|
@ -423,9 +425,10 @@ frozen_components = ["parser", "custom"]
|
|||
|
||||
When the components in your pipeline
|
||||
[share an embedding layer](/usage/embeddings-transformers#embedding-layers), the
|
||||
**performance** of your frozen component will be **degraded** if you continue training
|
||||
other layers with the same underlying `Tok2Vec` instance. As a rule of thumb,
|
||||
ensure that your frozen components are truly **independent** in the pipeline.
|
||||
**performance** of your frozen component will be **degraded** if you continue
|
||||
training other layers with the same underlying `Tok2Vec` instance. As a rule of
|
||||
thumb, ensure that your frozen components are truly **independent** in the
|
||||
pipeline.
|
||||
|
||||
</Infobox>
|
||||
|
||||
|
|
|
@ -67,6 +67,16 @@ improvements**. The [API docs](/api) include additional deprecation notes. New
|
|||
methods and functions that were introduced in this version are marked with the
|
||||
tag <Tag variant="new">3</Tag>.
|
||||
|
||||
<YouTube id="9k_EfV7Cns0"></YouTube>
|
||||
|
||||
<Grid cols={2} gutterBottom={false} narrow>
|
||||
|
||||
<YouTube id="BWhh3r6W-qE"></YouTube>
|
||||
|
||||
<YouTube id="8HL-Ap5_Axo"></YouTube>
|
||||
|
||||
</Grid>
|
||||
|
||||
### Transformer-based pipelines {#features-transformers}
|
||||
|
||||
> #### Example
|
||||
|
|
|
@ -8,8 +8,8 @@ import { markdownToReact } from './util'
|
|||
|
||||
import classes from '../styles/embed.module.sass'
|
||||
|
||||
const YouTube = ({ id, ratio = '16x9' }) => {
|
||||
const embedClassNames = classNames(classes.root, classes.responsive, {
|
||||
const YouTube = ({ id, ratio = '16x9', className }) => {
|
||||
const embedClassNames = classNames(classes.root, classes.responsive, className, {
|
||||
[classes.ratio16x9]: ratio === '16x9',
|
||||
[classes.ratio4x3]: ratio === '4x3',
|
||||
})
|
||||
|
|
|
@ -109,16 +109,18 @@ export const LandingBanner = ({
|
|||
return (
|
||||
<div className={classes.banner} style={style}>
|
||||
<Grid cols={small ? null : 3} narrow className={contentClassNames}>
|
||||
<Heading Component="h3" className={classes.bannerTitle}>
|
||||
{label && (
|
||||
<div className={classes.bannerLabel}>
|
||||
<span className={classes.label}>{label}</span>
|
||||
</div>
|
||||
)}
|
||||
<Link to={to} hidden>
|
||||
{title}
|
||||
</Link>
|
||||
</Heading>
|
||||
{(title || label) && (
|
||||
<Heading Component="h3" className={classes.bannerTitle}>
|
||||
{label && (
|
||||
<div className={classes.bannerLabel}>
|
||||
<span className={classes.label}>{label}</span>
|
||||
</div>
|
||||
)}
|
||||
<Link to={to} hidden>
|
||||
{title}
|
||||
</Link>
|
||||
</Heading>
|
||||
)}
|
||||
<div className={textClassNames}>
|
||||
<p>{children}</p>
|
||||
|
||||
|
|
|
@ -26,12 +26,18 @@ const NavigationDropdown = ({ items = [], section }) => {
|
|||
)
|
||||
}
|
||||
|
||||
export default function Navigation({ title, items = [], section, search, children }) {
|
||||
export default function Navigation({ title, items = [], section, search, alert, children }) {
|
||||
return (
|
||||
<nav className={classes.root}>
|
||||
<Link to="/" aria-label={title} hidden>
|
||||
<Link
|
||||
to="/"
|
||||
aria-label={title}
|
||||
hidden
|
||||
className={classNames({ [classes.hasAlert]: !!alert })}
|
||||
>
|
||||
<h1 className={classes.title}>{title}</h1>
|
||||
<Logo className={classes.logo} width={300} height={96} />
|
||||
{alert && <span className={classes.alert}>{alert}</span>}
|
||||
</Link>
|
||||
|
||||
<div className={classes.menu}>
|
||||
|
|
|
@ -83,10 +83,33 @@
|
|||
border: 2px dotted var(--color-theme)
|
||||
outline: none
|
||||
|
||||
.has-alert
|
||||
display: inline-flex
|
||||
flex-flow: row nowrap
|
||||
align-items: center
|
||||
|
||||
.alert
|
||||
font-size: 1.2rem
|
||||
font-family: var(--font-primary)
|
||||
display: inline-block
|
||||
background: var(--color-yellow-opaque)
|
||||
color: var(--color-dark)
|
||||
border-radius: var(--border-radius)
|
||||
margin-left: var(--spacing-xs)
|
||||
padding: 0.5rem
|
||||
line-height: var(--line-height-xs)
|
||||
text-align: center
|
||||
|
||||
@include breakpoint(max, xs)
|
||||
.list
|
||||
display: none
|
||||
|
||||
.alert
|
||||
display: none
|
||||
|
||||
.has-alert
|
||||
display: inline
|
||||
|
||||
@include breakpoint(min, sm)
|
||||
.dropdown
|
||||
display: none
|
||||
|
|
|
@ -108,6 +108,12 @@ const AlertSpace = ({ nightly }) => {
|
|||
)
|
||||
}
|
||||
|
||||
const navAlert = (
|
||||
<Link to="/usage/v3" hidden>
|
||||
<strong>💥 Out now:</strong> spaCy v3.0
|
||||
</Link>
|
||||
)
|
||||
|
||||
class Layout extends React.Component {
|
||||
static defaultProps = {
|
||||
scope: {},
|
||||
|
@ -177,6 +183,7 @@ class Layout extends React.Component {
|
|||
items={meta.navigation}
|
||||
section={section}
|
||||
search={<Search settings={meta.docSearch} />}
|
||||
alert={navAlert}
|
||||
>
|
||||
<Progress key={location.href} />
|
||||
</Navigation>
|
||||
|
|
|
@ -17,6 +17,7 @@ import { H2 } from '../components/typography'
|
|||
import { InlineCode } from '../components/code'
|
||||
import Button from '../components/button'
|
||||
import Link from '../components/link'
|
||||
import { YouTube } from '../components/embed'
|
||||
|
||||
import QuickstartTraining from './quickstart-training'
|
||||
import Project from './project'
|
||||
|
@ -24,7 +25,6 @@ import Features from './features'
|
|||
import courseImage from '../../docs/images/course.jpg'
|
||||
import prodigyImage from '../../docs/images/prodigy_overview.jpg'
|
||||
import projectsImage from '../../docs/images/projects.png'
|
||||
import irlBackground from '../images/spacy-irl.jpg'
|
||||
|
||||
import Benchmarks from 'usage/_benchmarks-models.md'
|
||||
|
||||
|
@ -206,50 +206,29 @@ const Landing = ({ data }) => {
|
|||
</LandingGrid>
|
||||
|
||||
<LandingBannerGrid>
|
||||
<LandingBanner
|
||||
title="spaCy v3.0 nightly: Transformer-based pipelines, new training system, project templates & more"
|
||||
label="Try the pre-release"
|
||||
to="https://nightly.spacy.io"
|
||||
button="See what's new"
|
||||
background="#8758fe"
|
||||
color="#ffffff"
|
||||
small
|
||||
>
|
||||
spaCy v3.0 features all new <strong>transformer-based pipelines</strong> that
|
||||
bring spaCy's accuracy right up to the current <strong>state-of-the-art</strong>
|
||||
. You can use any pretrained transformer to train your own pipelines, and even
|
||||
share one transformer between multiple components with{' '}
|
||||
<strong>multi-task learning</strong>. Training is now fully configurable and
|
||||
extensible, and you can define your own custom models using{' '}
|
||||
<strong>PyTorch</strong>, <strong>TensorFlow</strong> and other frameworks. The
|
||||
new spaCy projects system lets you describe whole{' '}
|
||||
<strong>end-to-end workflows</strong> in a single file, giving you an easy path
|
||||
from prototype to production, and making it easy to clone and adapt
|
||||
best-practice projects for your own use cases.
|
||||
<LandingBanner background="#0099dd" color="#ffffff" small>
|
||||
<YouTube id="9k_EfV7Cns0" />
|
||||
</LandingBanner>
|
||||
|
||||
<LandingBanner
|
||||
title="Prodigy: Radically efficient machine teaching"
|
||||
label="From the makers of spaCy"
|
||||
to="https://prodi.gy"
|
||||
button="Try it out"
|
||||
to="https://course.spacy.io"
|
||||
button="Start the course"
|
||||
background="#f6f6f6"
|
||||
color="#000"
|
||||
color="#252a33"
|
||||
small
|
||||
>
|
||||
<Link to="https://prodi.gy" hidden>
|
||||
<Link to="https://course.spacy.io" hidden>
|
||||
<img
|
||||
src={prodigyImage}
|
||||
alt="Prodigy: Radically efficient machine teaching"
|
||||
src={courseImage}
|
||||
alt="Advanced NLP with spaCy: A free online course"
|
||||
/>
|
||||
</Link>
|
||||
<br />
|
||||
<br />
|
||||
Prodigy is an <strong>annotation tool</strong> so efficient that data scientists
|
||||
can do the annotation themselves, enabling a new level of rapid iteration.
|
||||
Whether you're working on entity recognition, intent detection or image
|
||||
classification, Prodigy can help you <strong>train and evaluate</strong> your
|
||||
models faster.
|
||||
In this <strong>free and interactive online course</strong> you’ll learn how to
|
||||
use spaCy to build advanced natural language understanding systems, using both
|
||||
rule-based and machine learning approaches. It includes{' '}
|
||||
<strong>55 exercises</strong> featuring videos, slide decks, multiple-choice
|
||||
questions and interactive coding practice in the browser.
|
||||
</LandingBanner>
|
||||
</LandingBannerGrid>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user