diff --git a/examples/C/ner/ner_example.c b/examples/C/ner/ner_example.c index 7e4fa26f2..9a1078c9c 100644 --- a/examples/C/ner/ner_example.c +++ b/examples/C/ner/ner_example.c @@ -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)); diff --git a/examples/cpp/ner/ner_example.cpp b/examples/cpp/ner/ner_example.cpp index dabc22df6..5f7ce094f 100644 --- a/examples/cpp/ner/ner_example.cpp +++ b/examples/cpp/ner/ner_example.cpp @@ -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 diff --git a/examples/java/NerExample.java b/examples/java/NerExample.java index d8d60ee1e..038d5bbf1 100644 --- a/examples/java/NerExample.java +++ b/examples/java/NerExample.java @@ -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(); diff --git a/examples/python/ner.py b/examples/python/ner.py index 698343f8f..fd49f6870 100755 --- a/examples/python/ner.py +++ b/examples/python/ner.py @@ -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]