Categorical Semantics for Feynman Diagrams