<commit_before>import {
  get,
  getIn,
  generateIdString,
  getFromJsonLd,
} from "../../app/utils.js";
import Immutable from "immutable";
import won from "../../app/won-es6.js";

export const location = {
  identifier: "location",
  label: "Location",
  icon: "#ico36_detail_location",
  placeholder: "Search for location",
  component: "won-location-picker",
  viewerComponent: "won-location-viewer",
  messageEnabled: true,
  parseToRDF: function({ value, identifier, contentUri }) {
    return {
      "won:hasLocation": genSPlace({
        geoData: value,
        baseUri: genDetailBaseUri(identifier, contentUri),
      }),
    };
  },
  parseFromRDF: function(jsonLDImm) {
    const jsonldLocation = jsonLDImm && jsonLDImm.get("won:hasLocation");
    return parseSPlace(jsonldLocation);
  },
  generateHumanReadable: function({ value, includeLabel }) {
    return sPlaceToHumanReadable({
      value,
      label: includeLabel ? this.label : "",
    });
  },
};

export const jobLocation = {
  identifier: "jobLocation",
  label: "Job Location",
  placeholder: "Search for location",<commit_msg>Fix bug in generation of location uri<commit_after>import {
  get,
  getIn,
  generateIdString,
  getFromJsonLd,
} from "../../app/utils.js";
import Immutable from "immutable";
import won from "../../app/won-es6.js";

export const location = {
  identifier: "location",
  label: "Location",
  icon: "#ico36_detail_location",
  placeholder: "Search for location",
  component: "won-location-picker",
  viewerComponent: "won-location-viewer",
  messageEnabled: true,
  parseToRDF: function({ value, identifier, contentUri }) {
    return {
      "won:hasLocation": genSPlace({
        geoData: value,
        baseUri: genDetailBaseUri(contentUri, identifier),
      }),
    };
  },
  parseFromRDF: function(jsonLDImm) {
    const jsonldLocation = jsonLDImm && jsonLDImm.get("won:hasLocation");
    return parseSPlace(jsonldLocation);
  },
  generateHumanReadable: function({ value, includeLabel }) {
    return sPlaceToHumanReadable({
      value,
      label: includeLabel ? this.label : "",
    });
  },
};

export const jobLocation = {
  identifier: "jobLocation",
  label: "Job Location",
  placeholder: "Search for location",
{'fraction_non_alphanumeric': 0.13799283154121864, 'fraction_numerical': 0.002688172043010753, 'mean_word_length': 3.8021505376344087, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '534497', 'n_tokens_mistral': 693, 'n_tokens_neox': 684, 'n_words': 159}