Comparing the contents of 2 .nsm (naming standards) files
Export both files, see How do I open an ERwin Naming Standards file (.nsm) in Excel?

Use a file compare tool to compare the contents.

If you decide to write a program yourself, follow the advice in this Stack Overflow answer:

Comparing the contents of 2 excel files