Permalink
Browse files

adding a couple more entity types

  • Loading branch information...
1 parent a1a81fc commit 8804d8d0af7b4ba59b079fef019af218eb7a28a9 @jashkenas jashkenas committed Jun 28, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 public/js/api.js
  2. +1 −1 src/api.coffee
View
@@ -303,7 +303,7 @@ within a document, and connects them to the web of linked data.',
_a = response;
for (hash in _a) { if (__hasProp.call(_a, hash)) {
val = _a[hash];
- if (('Category' === (_b = val._type) || 'Company' === _b || 'Organization' === _b || 'City' === _b || 'Person' === _b || 'IndustryTerm' === _b || 'NaturalFeature' === _b)) {
+ if (('Category' === (_b = val._type) || 'Company' === _b || 'Organization' === _b || 'City' === _b || 'Person' === _b || 'IndustryTerm' === _b || 'NaturalFeature' === _b || 'Country' === _b || 'Facility' === _b || 'Region' === _b || 'Product' === _b)) {
sets[val._type] = sets[val._type] || [];
sets[val._type].push([val.name, val.relevance, val.instances[0].detection]);
}
View
@@ -231,7 +231,7 @@ window.API: {
# Process the JSON response from OpenCalais into tables.
calaisComplete: (response) ->
sets: {}
- for hash, val of response when val._type in ['Category', 'Company', 'Organization', 'City', 'Person', 'IndustryTerm', 'NaturalFeature']
+ for hash, val of response when val._type in ['Category', 'Company', 'Organization', 'City', 'Person', 'IndustryTerm', 'NaturalFeature', 'Country', 'Facility', 'Region', 'Product']
sets[val._type]: or []
sets[val._type].push [val.name, val.relevance, val.instances[0].detection]
tables: for title, rows of sets

0 comments on commit 8804d8d

Please sign in to comment.