This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import Counter | |
import pandas as pd | |
# Define scoring variables | |
core_set_score = 5 | |
second_tier_score = 3 | |
third_tier_score = 1 | |
grace_zone_boost = 1 | |
entity_boost = 1 | |
double_entity_boost = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.feature_extraction.text import TfidfVectorizer | |
from nltk.corpus import stopwords | |
from collections import Counter | |
import pandas as pd | |
import os | |
# Read text from files | |
texts = {} | |
for filename in os.listdir('./texts/'): # Assuming the files are in a folder called 'texts' | |
if filename.endswith('.txt'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Constants | |
const API_KEY = "YOUR API KEY"; | |
const MODEL_TYPE = "gpt-3.5-turbo"; //chatGPT model | |
const MAX_TOKENS = 4096; | |
function CHATGPT(promptCellRef, contentRangeRef) { | |
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
// Get the prompt from the specified cell | |
const promptCell = sheet.getRange(promptCellRef); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json"> | |
[ | |
{ | |
"about": [ | |
{ | |
"@context": "http://schema.org", | |
"@type": "Thing", | |
"name": "Semantic publishing", | |
"description": "Semantic publishing on the Web, or semantic web publishing, refers to publishing information on the web as documents accompanied by semantic markup. Semantic publication provides a way for computers to understand the structure and even the meaning of the published information, making information search and data integration more efficient.", | |
"sameAs": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json"> | |
[ | |
{ | |
"mentions": [ | |
{ | |
"@context": "http://schema.org", | |
"@type": "Thing", | |
"name": "Named-entity recognition", | |
"description": "Named-entity recognition (NER) (also known as (named) entity identification entity chunking and entity extraction) is a subtask of information extraction that seeks to locate and classify named entities mentioned in unstructured text into pre-defined categories such as person names organizations locations medical codes time expressions quantities monetary values percentages etc. Most research on NER/NEE systems has been structured as taking an unannotated block of text such as this one: Jim bought 300 shares of Acme Corp", | |
"SameAs": [ |