code: public static String getExpectedMetadataFileName(String dictionaryFile) {
      final int dotIndex = dictionaryFile.lastIndexOf('.');
      final String featuresName;
      if (dotIndex >= 0) {
        featuresName = dictionaryFile.substring(0, dotIndex) + "." + METADATA_FILE_EXTENSION;
      } else {
        featuresName = dictionaryFile + "." + METADATA_FILE_EXTENSION;
      }
    
      return featuresName;
    }
docs: Returns the expected name of the metadata file, based on the name of the
  dictionary file. The expected name is resolved by truncating any
  file extension of <code>name</code> and appending
  {@link DictionaryMetadata#METADATA_FILE_EXTENSION}.
  
  @param dictionaryFile The name of the dictionary (<code>*.dict</code>) file.
  @return Returns the expected name of the metadata file.