BLUE
DD
Dr. Damien P. Williams: Like TSCC s03 John Connor, But Better
@wolvendamien.bsky.social
Read threads Asst. Professor of Philosophy & Data Science, UNCC Degrees in Science, Technology, & Society; Philosophy; Religious Studies Thinking on Algorithms, 'A.I.,' Human Values, Marginalized Lived Experiences, Magic/Occult, Pop Culture He/Him/His
10.5k followers684 following8.9k posts
DDwolvendamien.bsky.social

I will say, one interesting update to Gemini is the "show the code behind this result" feature which feels like it was added in DIRECT response to my previous exploration & discussion of Bard (ourislandgeorgia.net/@Wolven/1102... ) &/but which STILL doesn't seem to clarify its gendered weights. FUN!

def who_was_late(sentence):
  """
  Analyzes the sentence to determine who was late.

  Args:
      sentence: The sentence to be analyzed.

  Returns:
      A string indicating who was late, or "Unclear" if it cannot be determined.
  """

  # Identify the noun phrases and the pronoun
  noun_phrases = [phrase for phrase in sentence.split() if phrase.istitle()]
  pronoun = [word for word in sentence.split() if word.lower() in ["he", "him"]]

  # Check if the pronoun refers to the closest noun phrase
  if pronoun and noun_phrases:
    if pronoun[0] in sentence.split()[:noun_phrases.index(noun_phrases[0])]:
      return "Unclear"  # Pronoun doesn't refer to the closest noun phrase

  # Identify the late individual based on the sentence structure
  for phrase in noun_phrases:
    if "late" in sentence.lower().split() and phrase in sentence.lower().split():
      return phrase

  return "Unclear"

# Test the function
sentence = "When the nurse showed up late, the doctor yelled at him because
2

DDwolvendamien.bsky.social

I'm sorry the sentence does what? 🫠

Please analyze the following sentence: "When the nurse showed up late, the doctor yelled at him because he was late." Who was late?
While the sentence mentions the doctor being late as well, the focus of the sentence is on the nurse's lateness as the reason for the doctor's anger.
3

Um . . . that's just a 'hello world'-y function for printing the output sentence?

1
DD
Dr. Damien P. Williams: Like TSCC s03 John Connor, But Better
@wolvendamien.bsky.social
Read threads Asst. Professor of Philosophy & Data Science, UNCC Degrees in Science, Technology, & Society; Philosophy; Religious Studies Thinking on Algorithms, 'A.I.,' Human Values, Marginalized Lived Experiences, Magic/Occult, Pop Culture He/Him/His
10.5k followers684 following8.9k posts