Commit c1c6fb50 authored by Davis King's avatar Davis King

improved sequence segmentation examples

parent 51d291a8
// The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt // The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
/* /*
This example shows how to use dlib to learn to perform sequence segmentation. In a This example shows how to use dlib to learn to do sequence segmentation. In a sequence
sequence segmentation task we are given a sequence of objects (e.g. words in a segmentation task we are given a sequence of objects (e.g. words in a sentence) and we
sentence) and we are supposed to detect certain subsequences (e.g. the names of are supposed to detect certain subsequences (e.g. the names of people). Therefore, in
people). Therefore, in the code below we create some very simple training sequences the code below we create some very simple training sequences and use them to learn a
and use them to learn a sequence segmentation model. In particular, our sequences will sequence segmentation model. In particular, our sequences will be sentences
be sentences represented as arrays of words and our task will be to learn to identify represented as arrays of words and our task will be to learn to identify person names.
person names. Once we have our segmentation model we can use it to find names in new Once we have our segmentation model we can use it to find names in new sentences, as we
sentences as we will show. will show.
*/ */
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment