<commit_before>export Localization, LocElem, Loc

###############################################################################

#   Declaration types
#   Loc / LocElem
#
###############################################################################

import AbstractAlgebra: base_ring, parent, check_parent, isunit, inv, +, -, *,
      divexact, zero, Base.promote_rule, elem_type, parent_type, Base.one,
      Base.iszero, Base.isone, Base.==, Base.gcd, Base.deepcopy_internal,
      needs_parentheses, Base.show, displayed_with_minus_in_front, show_minus_one,
      Base.^, data, Base.numerator, Base.denominator, canonical_unit, Base.gcdx,
      Base.div, divides, Base.lcm, Base.rand, Nemo.prime

#prime might be product of several primes if localized at several primes, those primes are in array primes
mutable struct Loc{T} <: AbstractAlgebra.Ring
   base_ring::AbstractAlgebra.Ring
   prime::T
   primes::Array{T,1}  # in general, not set.
   comp::Bool  # false: den has to be coprime to prime
               # true:  den can ONLY use prime (and powers)

   function Loc{T}(prime::T, primes::Array{T,1}, cached::Bool = true, comp::Bool = false) where {T <: RingElem}<commit_msg>make travis happy<commit_after>export Localization, LocElem, Loc

###############################################################################

#   Declaration types
#   Loc / LocElem
#
###############################################################################

import AbstractAlgebra: base_ring, parent, check_parent, isunit, inv, +, -, *,
      divexact, zero, Base.promote_rule, elem_type, parent_type, Base.one,
      Base.iszero, Base.isone, Base.==, Base.gcd, Base.deepcopy_internal,
      needs_parentheses, Base.show, displayed_with_minus_in_front, show_minus_one,
      Base.^, data, Base.numerator, Base.denominator, canonical_unit, Base.gcdx,
      Base.div, divides, Base.lcm, Base.rand, 
import Nemo: prime

#prime might be product of several primes if localized at several primes, those primes are in array primes
mutable struct Loc{T} <: AbstractAlgebra.Ring
   base_ring::AbstractAlgebra.Ring
   prime::T
   primes::Array{T,1}  # in general, not set.
   comp::Bool  # false: den has to be coprime to prime
               # true:  den can ONLY use prime (and powers)

   function Loc{T}(prime::T, primes::Array{T,1}, cached::Bool = true, comp::Bool = false) where {T <: RingElem}
{'fraction_non_alphanumeric': 0.2300292764533668, 'fraction_numerical': 0.001672940192388122, 'mean_word_length': 4.763855421686747, 'pattern_counts': {'":': 0, '<': 7, '<?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': '739051', 'n_tokens_mistral': 733, 'n_tokens_neox': 697, 'n_words': 197}