Load the dictionaries.

@throws IOException
if io problems
424860
private void loadDictionary(final InputStream dictInputStream)
      throws IOException {
    dictionary = new HashMap<String, String>();
    final BufferedReader breader = new BufferedReader(
        new InputStreamReader(dictInputStream, Charset.forName("UTF-8")));
    String line;
    while ((line = breader.readLine()) != null) {
      final String[] lineArray = tabPattern.split(line);
      if (lineArray.length == 4) {
        final Matcher lineMatcher = linePattern
            .matcher(lineArray[0].toLowerCase());
        dictionary.put(lineMatcher.replaceAll(" "), lineArray[2]);
      } else {
        System.err.println("WARNING: line starting with " + lineArray[0]
            + " is not well-formed; skipping!!");
      }
    }
  }
300706
def dict_load(self, ns_dict):
        
        for prefix, uri in ns_dict.items():
            self.bind(prefix, uri, override=False, calc=False)
        self.__make_dicts__
624116
public void load(MemoryShortArray shortArray) throws IOException {
    if (!_file.exists() || _file.length() == 0) {
      return;
    }
    
    Chronos c = new Chronos();
    DataReader r = IOFactory.createDataReader(_file, _type);
    
    try {
      r.open();
      r.position(DATA_START_POSITION);
      
      for (int i = 0; i < _arrayLength; i++) {
        shortArray.set(i, r.readShort());
      }
      
      _log.info(_file.getName() + " loaded in " + c.getElapsedTime());
    } finally {
      r.close();
    }
  }
1271702
public void load(File... statistics) throws IOException {
        setFeatureStats(new MinMaxStats(Nd4j.readBinary(statistics[0]), Nd4j.readBinary(statistics[1])));
        if (isFitLabel()) {
            setLabelStats(new MinMaxStats(Nd4j.readBinary(statistics[2]), Nd4j.readBinary(statistics[3])));
        }
    }
555487
private function load()
    {
        $decoder = new JsonDecoder();
        $decoder->setObjectDecoding(JsonDecoder::ASSOC_ARRAY);

        $this->json = file_exists($this->path)
            ? $decoder->decodeFile($this->path)
            : array();
    }
506617
@Initialize
    public void init() {
        logger.info("Initializing dictionary: {}", this);
        Datastore datastore = getDatastore();
        DatastoreConnection dataContextProvider = datastore.openConnection();
        getDatastoreConnections().add(dataContextProvider);
    }
853709
public synchronized void load2() throws IOException {
        COL result = create();

        if (exists()) {
            try (LinesStream stream = linesStream()) {
                for (String line : stream) {
                    if (line.startsWith("#")) continue;   // comment
                    T r = parse(line);
                    if (r != null)
                        result.add(r);
                }
            }
        }

        parsed = readOnly(result);
    }
796603
private function loadDictionaries()
    {
        if (null !== $this->words) {
            // Dictionaries already loaded
            return;
        }

        $this->words = array();

        $dictionaryFiles = glob($this->dictionaryDir . '/*');

        foreach ($dictionaryFiles as $dictionaryFile) {
            $fileName = substr($dictionaryFile, strlen($this->dictionaryDir) + 1);

            preg_match('/^(.+)\./', $fileName, $parts);
            $lang = $parts[1];

            $words = include $dictionaryFile;

            foreach ($words as $word) {
                if (!isset($this->words[$word])) {
                    $this->words[$word] = array();
                }

                if (!in_array($lang, $this->words[$word])) {
                    $this->words[$word][] = $lang;
                }
            }
        }
    }
203304
public void init() throws IOException {
        File path = resolveIndexDirectoryPath();
        indexTracker = new IndexTracker(path);
        indexDirectory = FSDirectory.open(path);
        tika = new Tika(null, new HtmlParser());
        Analyzer analyzer = new StandardAnalyzer();
        IndexWriterConfig config = new IndexWriterConfig(Version.LATEST, analyzer);
        writer = new IndexWriter(indexDirectory, config);
    }
318570
public boolean loadDictionary(InputStream corpus, int termIndex, int countIndex) {
    if (corpus == null) {
      return false;
    }
    BufferedReader br = new BufferedReader(new InputStreamReader(corpus, StandardCharsets.UTF_8));
    return loadDictionary(br, termIndex, countIndex);
  }
1118076
public void load() throws IOException {
        logRecorders.clear();
        File dir = configDir();
        File[] files = dir.listFiles((FileFilter)new WildcardFileFilter("*.xml"));
        if(files==null)     return;
        for (File child : files) {
            String name = child.getName();
            name = name.substring(0,name.length()-4);   // cut off ".xml"
            LogRecorder lr = new LogRecorder(name);
            lr.load();
            logRecorders.put(name,lr);
        }
    }
704212
private void loadDataFromInternetAndSave() throws IOException {
		InputStream is = null;
		FileOutputStream fos = null;
		try {
			URL url = new URL(DATA_RETRIVE_URL);
			is = url.openStream();
			fos = new FileOutputStream(getCacheFile());
			byte[] buff = new byte[1024 * 8];
			int len = 0;
			while ((len = is.read(buff)) != -1) {
				fos.write(buff, 0, len);
			}
		} finally {
			if (is != null) {
				is.close();
			}
			if (fos != null) {
				fos.close();
			}
		}

	}
244964
private ArrayList<String[]> loadDict(String path) throws IOException {
		Scanner scanner = new Scanner(new FileInputStream(path), "utf-8");
		ArrayList<String[]> al = new ArrayList<String[]>();
		while(scanner.hasNext()) {
			String line = scanner.nextLine().trim();
			if(line.length() > 0) {
				String[] s = line.split("\\s");
				al.add(s);
			}
		}
		scanner.close();
		return al;
	}
1273075
private void loadAllChemComps() throws IOException {
		String fileName = getLocalFileName();
		logger.debug("Loading " + fileName);
		InputStreamProvider isp = new InputStreamProvider();


		InputStream inStream = isp.getInputStream(fileName);

		MMcifParser parser = new SimpleMMcifParser();

		ChemCompConsumer consumer = new ChemCompConsumer();

		// The Consumer builds up the BioJava - structure object.
		// you could also hook in your own and build up you own data model.
		parser.addMMcifConsumer(consumer);

		parser.parse(new BufferedReader(new InputStreamReader(inStream)));

		dict = consumer.getDictionary();

		inStream.close();

	}
217280
public void load(final InputStream is, final String encoding) throws IOException {
		load(new InputStreamReader(is, encoding));
	}
1259768
public function load(): void
    {
        try {
            $keys = $this->cache->get(self::INDEXING_KEY);
            if ($keys instanceof Keys) {
                $this->keys = $keys;
                return;
            }
        } catch (CacheException $e) {
            trigger_error($e->getMessage(), E_USER_WARNING);
        }

        $this->keys = new Keys();
    }
1241494
private ImmutableList<LanguageDictionary> loadDictionaries() {
    Map<String, LanguageDictionary> languageNameMap = new HashMap<>();
    for (File f : LanguageDictionary.getL10NFiles(app)) {
      String name = LanguageDictionary.extractLanguageName(f);
      LanguageDictionary res = languageNameMap.get(name);
      if (res == null) {
        res = new LanguageDictionary(name);
        languageNameMap.put(name, res);
      }
      try {
        // Load the content.
        JSONObject content = res.readContentFromBinaryFile(f);
        res.addJSONContent(content);
      } catch (Exception e) {
        log.warning(
          "Error loading content for l10n for file: " + f.getAbsolutePath() + ", exception: " + e.getMessage() + "\n" +
          Arrays.asList(e.getStackTrace()));
      }
    }
    List<LanguageDictionary> dicts = new ArrayList<>(languageNameMap.values());
    Collections.sort(dicts, new Comparator<LanguageDictionary>() {
      @Override
      public int compare(LanguageDictionary o1, LanguageDictionary o2) {
        return o1.getLanguage().compareTo(o2.getLanguage());
      }
    });
    return ImmutableList.copyOf(dicts);
  }