Skip to content

Instantly share code, notes, and snippets.

View nawshad's full-sized avatar
:electron:

Nawshad Farruque nawshad

:electron:
View GitHub Profile
@Tostino
Tostino / inkbot_kg_2.txt
Last active February 1, 2025 09:37
Inkbot knowledge graph (2)
<#meta#>
- Date: 2023-05-16
- Task: kg
<#system#>
You are an AI assistant who will help the user with all their information requests.
<#chat#>
<#user#>
Your task is to construct a comprehensive Temporal Knowledge Graph
1. Read and understand the Document: Familiarize yourself with the essential elements, including (but not limited to) ideas, events, people, organizations, impacts, and key points, along with any explicitly mentioned or inferred dates or chronology
- Pretend the date found in 'Date' is the current date
@nawshad
nawshad / collect-timeline.py
Created October 15, 2020 07:59 — forked from emallson/collect-timeline.py
Iterating over user timelines with Twython
from twython import Twython, TwythonRateLimitError, TwythonError
from glob import glob
from util import sleep_until
from csv import DictReader, DictWriter
import os
APP_KEY = ''
ACCESS_TOKEN = ''
tw = Twython(APP_KEY, access_token=ACCESS_TOKEN)
@adsieg
adsieg / knowledge_based_measure.py
Created May 7, 2019 13:06
knowledge_based_measure
from nltk.corpus import wordnet as wn
from nltk.corpus import wordnet_ic
dog=wn.synsets('dog', pos=wn.NOUN)[0] #get the first noun synonym of the word "dog"
cat=wn.synsets('cat', pos=wn.NOUN)[0]
rose=wn.synsets('rose', pos=wn.NOUN)[0]
flower=wn.synsets('flower', pos=wn.NOUN)[0]
brown_ic = wordnet_ic.ic('ic-brown.dat') #load the brown corpus to compute the IC