The 48-year-old Kramer was suspended for eight months in 2008.
She was a tenured teacher at I.S. 72 in Staten Island.
In his decision, the judge included the students' lists of words. Many contained slang terms and expletives. The city's lawyers argued they were inappropriate for the classroom.
But Weinstein said Kramer handled the sensitive subject with skill and courage. The city said it disagreed with the decision.