Skip to content

Instantly share code, notes, and snippets.

@VeronicaM
Created April 16, 2019 00:02
Show Gist options
  • Save VeronicaM/884794f37111a759909b726dae970ec9 to your computer and use it in GitHub Desktop.
Save VeronicaM/884794f37111a759909b726dae970ec9 to your computer and use it in GitHub Desktop.
Google Vision Terms data structure
googleVisionTerms.data.forEach((word, index) => {
vocabularyResults.entities.push(Object.assign({}, word, {
saved: false,
strength: GOOGLE_VISION,
entityId: index,
image: `https://source.unsplash.com/collection/${index}/1600x900`,
courseLanguage: langCourse,
interfaceLanguage: langInterface,
courseKeyPhrase: { value: word.courseLang },
courseTranslation: { value: word.courseLang },
interfaceKeyPhrase: { value: word.interfaceLang },
interfaceTranslation: { value: word.interfaceLang }
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment