<commit_before>'use strict';

var RNSound = require('react-native').NativeModules.RNSound;
var IsAndroid = RNSound.IsAndroid;

var nextKey = 0;

function Sound(filename, basePath, onError) {
  this._filename = basePath ? basePath + '/' + filename : filename;

  if (IsAndroid && !basePath) {
    this._filename = filename.toLowerCase().replace(/\.[^.]+$/, '');
  }

  this._loaded = false;
  this._key = nextKey++;<commit_msg>Recognize a external file and a bundled file on Android.<commit_after>'use strict';

var RNSound = require('react-native').NativeModules.RNSound;
var IsAndroid = RNSound.IsAndroid;

var nextKey = 0;

function isRelativePath(path) {
  return !/^\//.test(path);
}

function Sound(filename, basePath, onError) {
  this._filename = basePath ? basePath + '/' + filename : filename;

  if (IsAndroid && !basePath && isRelativePath(filename)) {
    this._filename = filename.toLowerCase().replace(/\.[^.]+$/, '');
  }

  this._loaded = false;
  this._key = nextKey++;
{'fraction_non_alphanumeric': 0.16531440162271804, 'fraction_numerical': 0.002028397565922921, 'mean_word_length': 4.278074866310161, 'pattern_counts': {'":': 0, '<': 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': '3760237', 'n_tokens_mistral': 323, 'n_tokens_neox': 316, 'n_words': 71}