If Star Trek: The Next Generation had been made today, a time in which interpersonal relationships carry over into each subsequent episode, the android Lt. Commander Data (Brent Spiner) might have had a human girlfriend for an entire season. In 1991, in the back end of The Next Generation’s excellent fourth season, during the week of June 3, the episode “In Theory” aired, which tackled the simple idea of: What if an AI decided to get itself a girlfriend?
To be clear, TNG was not ahead of the curve on the whole concept of an AI companion, nor was the movie Her biting on the style of Star Trek, because the crucial difference about “In Theory” was the point of view. When script editor Michael Piller took over running the show at TNG in Season 3, the notion that various episodes focused on specific characters became the most famous trait of the series. You had Worf episodes or Crusher episodes or, in this case, Data episodes. “In Theory” is a Data episode, not about a sentient AI being selected as a romantic partner, but instead, about an AI deciding for himself if a relationship is even possible.