Gets an instance of the dictionary.

@param baseFileName the base name of the dictionary,
passing /dict/da_DK means that the files /dict/da_DK.dic
and /dict/da_DK.aff get loaded
770153
public Dictionary getDictionary(String baseFileName)
            throws IOException {

        if (map.containsKey(baseFileName)) {
            return map.get(baseFileName);

        } else {
            Dictionary d = new Dictionary(baseFileName);
            map.put(baseFileName, d);
            return d;
        }
    }
722757
def basename(self):
        ''''''
        return os.path.basename(self.read_file)[:-len(self._get_extension(self.read_file))]
1312438
public static String getBasename(final File file) {
    final String path = file.getPath();
    // Remove the extension
    String basename = file.getName();
    final int pos = basename.lastIndexOf('.');
    if (pos != -1) {
      basename = basename.substring(0, pos);
    }
    return basename;
  }
598422
def get_filename_and_extension_of(target_file):
    
    base_target_filename = os.path.basename(target_file)
    file_name, file_ext_with_dot = os.path.splitext(base_target_filename)
    return file_name, file_ext_with_dot
189888
def funname(file):
    """"""
    if isinstance(file, str):
        files = [file]
    else:
        files = file
    bases = [os.path.basename(f) for f in files]
    names = [os.path.splitext(b)[0] for b in bases]
    if isinstance(file, str):
        return names[0]
    else:
        return names
102989
private File getBaseDir( File path)
    {
    return
      path == null?
      baseDir_ :
      
      path.isAbsolute()?
      path :

      new File( baseDir_, path.getPath());
    }
968906
def readFAM(basefilename,usecols=None):
    
    fam = basefilename+'.fam'
    fam = SP.loadtxt(fam,dtype=bytes,usecols=usecols)
    return fam
1303013
private void loadDictionaries(final String inputDir) throws IOException {
    final List<File> fileList = StringUtils.getFilesInDir(new File(inputDir));
    dictNames = new ArrayList<String>(fileList.size());
    dictionaries = new ArrayList<Map<String, String>>(fileList.size());
    dictionariesIgnoreCase = new ArrayList<Map<String, String>>(
        fileList.size());
    System.err.println("\tloading dictionaries in " + inputDir + " directory");
    for (int i = 0; i < fileList.size(); ++i) {
      if (DEBUG) {
        System.err.println(
            "\tloading dictionary:...." + fileList.get(i).getCanonicalPath());
      }
      dictNames.add(fileList.get(i).getCanonicalPath());
      dictionaries.add(new HashMap<String, String>());
      dictionariesIgnoreCase.add(new HashMap<String, String>());

      final List<String> fileLines = Files.readLines(fileList.get(i),
          Charsets.UTF_8);
      for (final String line : fileLines) {
        final String[] lineArray = tabPattern.split(line);
        if (lineArray.length == 2) {
          dictionaries.get(i).put(lineArray[0], lineArray[1]);
          if (!line.equalsIgnoreCase("in") && !line.equalsIgnoreCase("on")
              && !line.equalsIgnoreCase("us") && !line.equalsIgnoreCase("or")
              && !line.equalsIgnoreCase("am")) {
            dictionariesIgnoreCase.get(i).put(lineArray[0].toLowerCase(),
                lineArray[1]);
          }
        }
      }
    }
    System.err.println("found " + dictionaries.size() + " dictionaries");
  }
930486
def filename(self, prefix='', suffix='', extension='.py'):
        """"""
        return BASE_NAME.format(prefix, self.num, suffix, extension)
231034
def basename(path, ext=""):
    """"""
    import os.path
    if ext is False:
        return os.path.basename(path).replace(extname(path), "")
    else:
        return os.path.basename(path).replace(ext, "")
392190
public String getDatabaseName(String databaseKey) {

        return getDatabaseProperties().get(databaseKey).getProperty(databaseKey + PROPKEY_NAME);
    }
1161501
function Dotfile(basename, options) {
  this.basename = basename;
  this.extname = '.json';
  this.dirname = (options && typeof options.dirname === 'string') ? options.dirname : Dotfile._tilde;
  this.filepath = path.join(this.dirname, '.' + this.basename + this.extname);
}
515237
def unique_file_name(base_name, extension=''):
    '''
    
    '''
    idcount = 0

    if extension and not extension.startswith('.'):
        extension = '.%s' % extension

    fname = base_name + extension

    while os.path.exists(fname):
        fname = "%s-%d%s" % (base_name, idcount, extension)
        idcount += 1

    return fname
181732
String getDatabaseName(String dbName) {
        if (mFileNameMap == null) {
            return null;
        }
        String name = mFileNameMap.get(dbName);
        if (name == null && dbName != null) {
            name = mFileNameMap.get(null);
        }
        if (name == null) {
            return null;
        }
        if (mDatabaseHook != null) {
            try {
                dbName = mDatabaseHook.databaseName(dbName);
            } catch (IncompatibleClassChangeError e) {
                // Method not implemented.
            }
        }
        return dbName;
    }
423530
protected Dictionary getDictionary() throws IOException {
    Dictionary dict = this.dictionary;
    if (dict == null) {
      synchronized (this) {
        dict = this.dictionary;
        if (dict == null) {
          URL url = JLanguageTool.getDataBroker().getFromResourceDirAsUrl(resourceFileName);
          this.dictionary = dict = Dictionary.read(url);
        }
      }
    }
    return dict;
  }
1298040
def getUrlFromFilename(self, filename):
        """"""
        components = util.splitpath(util.getRelativePath(self.basepath, filename))
        url = '/'.join([url_quote(component, '') for component in components])
        return self.baseurl + url
1167205
public static String basename(String path)
  {
    return path != null ? basename(new File(path)) : null;
  }