Skip to content

Instantly share code, notes, and snippets.

@bllin001
Last active December 10, 2024 16:29
Show Gist options
  • Save bllin001/184e02ca8193f58eae05535ba8c262cf to your computer and use it in GitHub Desktop.
Save bllin001/184e02ca8193f58eae05535ba8c262cf to your computer and use it in GitHub Desktop.
Llama 3.1, Phi 3.5, and Gemma 2 answer for NER tasks.
[Running] python -u "/Users/user/Library/CloudStorage/OneDrive-OldDominionUniversity/VMASC/Projects/narrative-characterization/app/utils/afm_ner.py"
model: llama3.1
Based on the passage, here are the extracted entities and their types:
* ("Joe Biden", "Person")
* ("Supreme Court", "Organization")
* ("South Carolina", "Location/Place")
---
model: phi3.5
[("Joe Biden", "Person"), ("President", "Title"), ("South Carolina district", "Geopolitical Entity"), ("racial discrimination", "Issue")]
Here, we identified:
- Joe Biden as a person (specifically someone in political office), denoted by the title 'President'.
- South Carolina district refers to a geographical entity. Here it's not just any region but specifically related with politics and voting rights issues hence more specific type could be "Political Entity". However, for simplicity I marked as general Geopolitical Entities because they usually represent regions or districts in such context.
- Racial discrimination refers to the issue being discussed which falls into a category of social/ethnical problems but not typically identified with standard entity types like person, location etc., hence it's denoted under 'Issue'.
---
model: gemma2
Here are the entities and their types from the passage:
* **("President Joe Biden", "PERSON")**
* **("Supreme Court", "ORGANIZATION")**
* **("redistricting of the South Carolina district", "EVENT")**
* **("South Carolina", "GPE")**
Let me know if you'd like to try another passage!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment