1. Confirm that the word is a noun, not merely a similar-looking word such as فِي.
2. Confirm final ya with kasrah immediately before it.
3. With ال, keep ya visible.
4. Without ال, omit ya in indefinite nominative and genitive, but keep it in accusative: هَادِيًا.
5. In the dual, ya appears before the dual ending.
6. In the sound masculine plural, delete ya and change kasrah to dammah.
7. In the sound feminine plural, keep ya and add اتٌ.
Do not transform the ending before identifying the exact grammatical case.