Data scrapping from web using NLP and Machine Learning.
let { registerTopics } = require("diffinder");
let topicsList = ["corona", "lockdown"]
registerTopics(topicsList, (err, success) => {
console.log(err, success)
})
let { topicAttribute } = require("diffinder");
let topicAttributeList = ["features"]
topicAttribute(topicAttributeList, (err, success) => {
console.log(err, success)
})
let { trustedLinks } = require("diffinder");
let trustedLinksList = ["https://www.google.com/search?"]
trustedLinks(trustedLinksList, (err, success) => {
console.log(err, success)
})
let { startProcess } = require("diffinder");
let params = {
trustedLinks: ["https://www.google.com/search?"],
listAttr: ["defination", "types", "features", "symptoms"], // optional
listTopic: ["diabetes insipidus"]
}
startProcess(params, (err, succ)=>{
console.log(err, succ)
})
let { getData } = require("diffinder");
let findAll = {};
getData(findAll, (err, succ)=>{
console.log(err, succ.length)
})
let findDataByKey = { key: 'diabetes_insipidus_symptoms'};
getData({ topic: 'diabetes insipidus'}, (err, succ)=>{
console.log(err, succ.length)
})
## output
/*
* [{
* topic: 'diabetes insipidus',
* attribute: 'symptoms',
* key: 'diabetes_insipidus_symptoms',
* accurate: 0.5776267051696777,
* type: 'diabetes insipidus symptoms',
* data:
* ' or help the health care provider determine if diabetes insipidus is the possible * cause of the patient\'s symptoms.',
* objID: 1588179831923
* }]
*/
let { getTopics, getAttributes, getTrustedLinks } = require("diffinder");
getTopics((err, success) => {
console.log(err, success)
})
getAttributes((err, success) => {
console.log(err, success)
})
getTrustedLinks((err, success) => {
console.log(err, success)
})
let { deleteTopics, deleteAttributes, deleteTrustedLinks } = require("diffinder");
deleteTopics((err, success) => {
console.log(err, success)
})
deleteAttributes((err, success) => {
console.log(err, success)
})
deleteTrustedLinks((err, success) => {
console.log(err, success)
})