How to determine whether a drug is brand or generics?

Dear Fabrício Kury

I hope I am not giving you a headache, but I have few more question for you please.

Regarding the problem of identifying Brand VS Generics, I followed your algorithm and it helped me identify a good percentage of the NDC codes I have.
However, by coincidence, I found few hundreds NDC codes that are associated with ANDA but are identified as brand-named drug by using TTY.

My understanding is that NDA codes belong to brand-named drugs while ANDA codes belong to generic drugs.

Is there a scenario where a drug associated with an ANDA is considered as brand-named instead of a generic drug? Or this is simply a mistake?

My second question is related to mapping NDC codes to NDA codes. I started a new topic, please follow this link if you want to join solving this problem:

And my third question is related to Authorized Generics, please follow this link:

Also, if I want to contact NLM directly about their data, do you recommend someone that can reply to my questions officially?

Thank you very much for your help.