refactor(subgen/filter): reuse the capitalize method