From 9b16325df656b83391723eb684337f1354d50b8f Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 22 Feb 2014 16:08:34 -0500 Subject: [PATCH] fixed more grammar --- python_examples/max_cost_assignment.py | 4 ++-- python_examples/sequence_segmenter.py | 6 +++--- python_examples/svm_rank.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python_examples/max_cost_assignment.py b/python_examples/max_cost_assignment.py index 7f990f8ee..15ece448d 100755 --- a/python_examples/max_cost_assignment.py +++ b/python_examples/max_cost_assignment.py @@ -17,14 +17,14 @@ import dlib -# Lets imagine you need to assign N people to N jobs. Additionally, each person will make +# Let's imagine you need to assign N people to N jobs. Additionally, each person will make # your company a certain amount of money at each job, but each person has different skills # so they are better at some jobs and worse at others. You would like to find the best way # to assign people to these jobs. In particular, you would like to maximize the amount of # money the group makes as a whole. This is an example of an assignment problem and is # what is solved by the dlib.max_cost_assignment() routine. -# So in this example, lets imagine we have 3 people and 3 jobs. We represent the amount of +# So in this example, let's imagine we have 3 people and 3 jobs. We represent the amount of # money each person will produce at each job with a cost matrix. Each row corresponds to a # person and each column corresponds to a job. So for example, below we are saying that # person 0 will make $1 at job 0, $2 at job 1, and $6 at job 2. diff --git a/python_examples/sequence_segmenter.py b/python_examples/sequence_segmenter.py index e7f89b7de..67bcebd66 100755 --- a/python_examples/sequence_segmenter.py +++ b/python_examples/sequence_segmenter.py @@ -78,7 +78,7 @@ def print_segment(sentence, names): -# Now lets make some training data. Each example is a sentence as well as a set of ranges +# Now let's make some training data. Each example is a sentence as well as a set of ranges # which indicate the locations of any names. names = dlib.ranges() # make an array of dlib.range objects. segments = dlib.rangess() # make an array of arrays of dlib.range objects. @@ -159,13 +159,13 @@ params.C = 10 model = dlib.train_sequence_segmenter(training_sequences, segments, params) -# Lets print out the things the model thinks are names. The output is a set of ranges +# Let's print out the things the model thinks are names. The output is a set of ranges # which are predicted to contain names. If you run this example program you will see that # it gets them all correct. for i in range(len(sentences)): print_segment(sentences[i], model(training_sequences[i])) -# Lets also try segmenting a new sentence. This will print out "Bob Bucket". Note that we +# Let's also try segmenting a new sentence. This will print out "Bob Bucket". Note that we # need to remember to use the same vector representation as we used during training. test_sentence = "There once was a man from Nantucket whose name rhymed with Bob Bucket" if use_sparse_vects: diff --git a/python_examples/svm_rank.py b/python_examples/svm_rank.py index e78549e39..e9abbfb93 100755 --- a/python_examples/svm_rank.py +++ b/python_examples/svm_rank.py @@ -25,7 +25,7 @@ import dlib -# Now lets make some testing data. To make it really simple, lets suppose that +# Now let's make some testing data. To make it really simple, let's suppose that # we are ranking 2D vectors and that vectors with positive values in the first # dimension should rank higher than other vectors. So what we do is make # examples of relevant (i.e. high ranking) and non-relevant (i.e. low ranking) @@ -47,7 +47,7 @@ trainer = dlib.svm_rank_trainer() # selecting a "simpler" solution which might generalize better. trainer.c = 10 -# So lets do the training. +# So let's do the training. rank = trainer.train(data) # Now if you call rank on a vector it will output a ranking score. In