Skip to content

Commit

Permalink
Just added a few more comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
davisking committed Jan 30, 2015
1 parent 81a2012 commit 3d86f2d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/C/ner/ner_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void print_entity (
pos = mitie_ner_get_detection_position(dets, i);
len = mitie_ner_get_detection_length(dets, i);
// Print the label and score for each named entity and also the text of the named entity
// itself.
// itself. The larger the score the more confident MITIE is in the tag.
printf(" Tag %lu: Score: %0.3f: %s: ", mitie_ner_get_detection_tag(dets,i),
mitie_ner_get_detection_score(dets,i),
mitie_ner_get_detection_tagstr(dets,i));
Expand Down
3 changes: 2 additions & 1 deletion examples/cpp/ner/ner_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ int main(int argc, char** argv)
// Now detect all the entities in the text file we loaded and print them to the screen.
// The output of this function is a set of "chunks" of tokens, each a named entity.
// Additionally, if it is useful for your application a confidence score for each "chunk"
// is available by using the predict() method.
// is available by using the predict() method. The larger the score the more
// confident MITIE is in the tag.
ner.predict(tokens, chunks, chunk_tags, chunk_scores);

// If a confidence score is not necessary for your application you can detect entities
Expand Down
5 changes: 3 additions & 2 deletions examples/java/NerExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ public static void main(String args[])
// define the range of tokens in the words vector that are part of the entity.
// There is also a tag which indicates which element of possibleTags is
// associated with the entity. There is also a score which indicates a
// confidence associated with the predicted tag. So we can print out all
// the tagged entities as follows:
// confidence associated with the predicted tag (larger values mean MITIE is
// more confident in its prediction). So we can print out all the tagged
// entities as follows:
EntityMention entity = entities.get(i);
String tag = possibleTags.get(entity.getTag());
Double score = entity.getScore();
Expand Down
3 changes: 2 additions & 1 deletion examples/python/ner.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
print "\nNumber of entities detected:", len(entities)

# entities is a list of tuples, each containing an xrange that indicates which
# tokens are part of the entity, the entity tag and an associate score. The
# tokens are part of the entity, the entity tag, and an associate score. The
# entities are also listed in the order they appear in the input text file.
# Here we just print the score, tag, and text for each entity to the screen.
# The larger the score the more confident MITIE is in its prediction.
for e in entities:
range = e[0]
tag = e[1]
Expand Down

0 comments on commit 3d86f2d

Please sign in to comment.