human
How do I know when to use a semicolon vs. a comma?
assistant
You can use a semicolon to separate independent clauses in a sentence, while using a comma to separate dependent clauses. A dependent clause is one that cannot stand on its own and requires the main clause for context. For example, "I like to eat pizza with anchovies." This sentence contains two independent clauses because it has two independent clauses separated by a semicolon. On the other hand, if you were to say, "I like to eat pizza, but I don't like anchovies," this would be a dependent clause since the second clause cannot stand alone.