create document vector space implementations with a companion object's apply; pass corpus as Iterable[String]