项目作者: nvif1989

项目描述 :
Names of each food in local languages, including scientific name.
高级语言: JavaScript
项目地址: git://github.com/nvif1989/descriptions.git
创建时间: 2019-12-31T09:11:15Z
项目社区:https://github.com/nvif1989/descriptions

开源协议:MIT License

下载


Names of each food in local languages, including scientific name.

This is part of package nvif1989.

Source: Nutritive Value of Indian Foods 1989.

  1. const descriptions = require('@nvif1989/descriptions');
  2. // descriptions.corpus: Map {code => {code, name, scie, desc}}
  3. // descriptions.load(): Promise (corpus loaded)
  4. // descriptions.sql([table], [options]): Promise (sql commands)
  5. // descriptions.csv(): path to csv file
  6. // descriptions(<query>)
  7. // -> [{code, name, scie, desc}] for matched foods
  8. async function main() {
  9. await descriptions.load();
  10. /* load corpus first */
  11. descriptions('khoa');
  12. // [
  13. // {
  14. // code: '430',
  15. // name: 'Khoa',
  16. // scie: '',
  17. // desc: 'B., H., Kan., Mal., P., Tel. Khoa; O. Kua; Tam. Thirattu pal'
  18. // },
  19. // {
  20. // code: '429',
  21. // name: 'Khoa (whole buffalo milk)',
  22. // scie: '',
  23. // desc: ''
  24. // }
  25. // ]
  26. descriptions('131');
  27. descriptions('132');
  28. descriptions('topioca');
  29. descriptions('simla alu');
  30. // [ { code: '131,132',
  31. // name: 'Topioca',
  32. // scie: 'Manihot esculenta',
  33. // desc:
  34. // 'B., H. Simla alu; Kan. Mara genasu; Mal. Marachini; O. Kathakonda; Tam. Maravalli kizhangu; Tel. Karrapendalamu; Other names: Cassava; Kappa' } ]
  35. descriptions('126');
  36. descriptions('127');
  37. // [ { code: '126-129',
  38. // name: 'Radish',
  39. // scie: 'Raphanus sativus',
  40. // desc:
  41. // 'B., G., Mar., O. Mula; H., P. Muli; Kan., Mal.; Tam., Tel. Mullangi; Kash. Muj; Other name: Wuazu' } ]
  42. descriptions('Raphanus sativus');
  43. // [ { code: '103',
  44. // name: 'Radish leaves',
  45. // scie: 'Raphanus sativus',
  46. // desc:
  47. // 'B., H., G., Mar. Mooli ka sag; Kash. Muji lak; Kan., Mal., Tam. Mullangi ilaigal; Tel. Mullangi akulu; Other name: Mulaka' },
  48. // { code: '104',
  49. // name: 'Table radish leaves',
  50. // scie: 'Raphanus sativus',
  51. // desc: '' },
  52. // { code: '126-129',
  53. // name: 'Radish',
  54. // scie: 'Raphanus sativus',
  55. // desc:
  56. // 'B., G., Mar., O. Mula; H., P. Muli; Kan., Mal.; Tam., Tel. Mullangi; Kash. Muj; Other name: Wuazu' } ]
  57. }
  58. main();

nvif1989

You can ask about composition of 592 key foods in India here: nvif1989.github.io.

Food composition values were measured by National Institute of Nutrition, Hyderabad.

Take a peek at the raw data here: Document, Webpage.