public void generateAmbit(String source, String word) {
        for (Place p : places) {
            int start = p.getLocation() - 60;
            int end = p.getLocation() + 60;
            while (start > 0 && source.charAt(start) != ' ') { // jump to space or string start
                start--;
            }
            start = start < 0 ? 0 : start;
            end = source.indexOf(' ', end);
            end = end == -1 ? source.length() : end; // jump to space or string end
            String ambit = source.substring(start, end).replace(" " + word + " ", "<b> " + word + " </b>");
            if (ambit.startsWith(word)) {
                ambit = "<b>" + word + "</b>" + ambit.substring(word.length());
            } else if (ambit.endsWith(word)) {
                ambit = ambit.substring(0, ambit.length() - word.length() ) + "<b>" + word + "</b>";
            }
            p.setAmbit(ambit);
        }
        hasAmbit = true;
    }