Function getBasenameTerms