<commit_before>package ai.ilikeplaces.logic.hotspots;

import ai.ilikeplaces.doc.License;
import ai.ilikeplaces.doc.TODO;
import ai.ilikeplaces.logic.validators.unit.BoundingBox;
import ai.ilikeplaces.util.Pair;
import com.google.gdata.data.geo.impl.W3CPoint;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: <NAME>
 * Date: Oct 10, 2010
 * Time: 9:14:23 PM
 */

@License(content = "This code is licensed under GNU AFFERO GENERAL PUBLIC LICENSE Version 3")
public class BBWithSpots extends Pair<BoundingBox, RawspotElasticArray> {
    private static final String SPACE = " ";
    private static final String DOUBLESPACE = "  ";
    private static final String EMPTY = "";

    /**
     * This is hard, but lets give it a try. First lets go for, requirements, then a small algorithm
     * <p/>
     * Requirements:
     * <p/>
     * Use less memory.
     * Compatibility with names like "titi kaka".
     * Support for multiple common names.
     * <p/>
     * Approaches:
     * <p/>
     * To grab names as "titi kaka", a substring(character sequence) based algorithm should be used.
     * Try to use exclusion. Note that to exclude, 3 items should be present
     * <p/>
     * <p/>
     * define Strings<br/><br/>
     * <p/>
     * "a is dumb"(A)                                                                                              <br/>
     * "b is a hotel"(B)                                                                                           <br/>
     * "hotel california"(C)                                                                                       <br/>
     * "this is hotel california, usa"(D)                                                                          <br/>
     * "this is not a hotel"(E)                                                                                    <br/>
     * <br/>
     * Triplet trip = {A,B,C}                                                                                      <br/>
     * Get 2 out of trip which have most matches                                                                   <br/>
     * <br/>
     * <br/>
     * <br/>
     * <br/>
     * <br/>
     * <br/>
     *
     * @return common name of this area
     */
    @TODO(tasks = {"Use random fetching for large datasets", "Greedy fetching of nearby locations"})
    final String modeName() {


        final Map<Integer, Pair<String, Integer>> index = new HashMap<Integer, Pair<String, Integer>>();

        int i = 0;
        while (i < getValue().array.length) {<commit_msg>Increased quote for unpopular places to 2<commit_after>package ai.ilikeplaces.logic.hotspots;

import ai.ilikeplaces.doc.License;
import ai.ilikeplaces.doc.TODO;
import ai.ilikeplaces.logic.validators.unit.BoundingBox;
import ai.ilikeplaces.util.Pair;
import com.google.gdata.data.geo.impl.W3CPoint;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: <NAME>
 * Date: Oct 10, 2010
 * Time: 9:14:23 PM
 */

@License(content = "This code is licensed under GNU AFFERO GENERAL PUBLIC LICENSE Version 3")
public class BBWithSpots extends Pair<BoundingBox, RawspotElasticArray> {
    private static final String SPACE = " ";
    private static final String DOUBLESPACE = "  ";
    private static final String EMPTY = "";

    /**
     * This is hard, but lets give it a try. First lets go for, requirements, then a small algorithm
     * <p/>
     * Requirements:
     * <p/>
     * Use less memory.
     * Compatibility with names like "titi kaka".
     * Support for multiple common names.
     * <p/>
     * Approaches:
     * <p/>
     * To grab names as "titi kaka", a substring(character sequence) based algorithm should be used.
     * Try to use exclusion. Note that to exclude, 3 items should be present
     * <p/>
     * <p/>
     * define Strings<br/><br/>
     * <p/>
     * "a is dumb"(A)                                                                                              <br/>
     * "b is a hotel"(B)                                                                                           <br/>
     * "hotel california"(C)                                                                                       <br/>
     * "this is hotel california, usa"(D)                                                                          <br/>
     * "this is not a hotel"(E)                                                                                    <br/>
     * <br/>
     * Triplet trip = {A,B,C}                                                                                      <br/>
     * Get 2 out of trip which have most matches                                                                   <br/>
     * <br/>
     * <br/>
     * <br/>
     * <br/>
     * <br/>
     * <br/>
     *
     * @return common name of this area
     */
    @TODO(tasks = {"Use random fetching for large datasets", "Greedy fetching of nearby locations"})
    final String modeName() {

        if(getValue().array.length < 2){
            return "Unpopular";
        }


        final Map<Integer, Pair<String, Integer>> index = new HashMap<Integer, Pair<String, Integer>>();

        int i = 0;
        while (i < getValue().array.length) {
{'fraction_non_alphanumeric': 0.10458507010231148, 'fraction_numerical': 0.006441834028040924, 'mean_word_length': 1.2793609671848014, 'pattern_counts': {'":': 0, '<': 64, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '935499', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1333, 'n_words': 438}