# Path: sanskrit_parser/base/sanskrit_base.py
# class SanskritObject(SanskritNormalizedString):
#     """ Sanskrit Object Class: Derived From SanskritString
# 
#         Attributes:
# 
#     """
#     def __init__(self, thing=None, encoding=None, unicode_encoding='utf-8',
#                  strict_io=True, replace_ending_visarga='s'):
#         super().__init__(thing, encoding, unicode_encoding, strict_io, replace_ending_visarga)
#         # Tags will go here as
#         self.tags = []
# 
#     def setMorphologicalTags(self, t):
#         """ Set Morphological Tags on Sanskrit Object
# 
#             Params:
#                t (list): List of morphological tags
#         """
#         self.tags.extend(t)
#         return self.tags
# 
#     def getMorphologicalTags(self):
#         """ Morphological Tags on object """
#         return self.tags
# 
# ITRANS = sanscript.ITRANS


import codecs
import inspect
import json
import logging
import os
import re
import progressbar
from sanskrit_parser.base.sanskrit_base import SanskritObject, ITRANS
from sanskrit_parser.lexical_analyzer.sanskrit_lexical_analyzer import SanskritLexicalAnalyzer
                    continue
            else:
                break
    return fs


def get_bg_refs(lexan, maxrefs=200):
    fs = []
    # Max splits for the next file, initialize
    m = maxrefs
    flist = ["sandhi_test_data/gitAanvayasandhivigraha.itx"]
    for fn in flist:
        if m != 0:
            r = process_bg_file(fn, m)
            if r is not None:
                fs.extend(r)
                m = m - len(r)
        else:
            break
    return fs


# FIXME - need to store the modified f,s instead of input references
def test_splits(lexan, bg_refs):
    # Check if s is in splits
    def _in_splits(s, splits):
        return s in [list(map(str, ss)) for ss in splits]

    f = bg_refs[0]
    s = [re.sub('H$', 's', SanskritObject(sx, encoding=ITRANS).canonical()) for sx in bg_refs[1]]

# Path: sanskrit_parser/base/sanskrit_base.py
# class SanskritObject(SanskritNormalizedString):
#     """ Sanskrit Object Class: Derived From SanskritString
# 
#         Attributes:
# 
#     """
#     def __init__(self, thing=None, encoding=None, unicode_encoding='utf-8',
#                  strict_io=True, replace_ending_visarga='s'):
#         super().__init__(thing, encoding, unicode_encoding, strict_io, replace_ending_visarga)
#         # Tags will go here as
#         self.tags = []
# 
#     def setMorphologicalTags(self, t):
#         """ Set Morphological Tags on Sanskrit Object
# 
#             Params:
#                t (list): List of morphological tags
#         """
#         self.tags.extend(t)
#         return self.tags
# 
#     def getMorphologicalTags(self):
#         """ Morphological Tags on object """
#         return self.tags
# 
# ITRANS = sanscript.ITRANS


# Path: tests/obsolete/generate_bg_Lexical_Analyzer_pass_fail.py
import codecs
import inspect
import json
import logging
import os
import re
import progressbar
from sanskrit_parser.base.sanskrit_base import SanskritObject, ITRANS
from sanskrit_parser.lexical_analyzer.sanskrit_lexical_analyzer import SanskritLexicalAnalyzer

                    continue
            else:
                break
    return fs


def get_bg_refs(lexan, maxrefs=200):
    fs = []
    # Max splits for the next file, initialize
    m = maxrefs
    flist = ["sandhi_test_data/gitAanvayasandhivigraha.itx"]
    for fn in flist:
        if m != 0:
            r = process_bg_file(fn, m)
            if r is not None:
                fs.extend(r)
                m = m - len(r)
        else:
            break
    return fs


# FIXME - need to store the modified f,s instead of input references
def test_splits(lexan, bg_refs):
    # Check if s is in splits
    def _in_splits(s, splits):
        return s in [list(map(str, ss)) for ss in splits]

    f = bg_refs[0]
    s = [re.sub('H$', 's', SanskritObject(sx, encoding=ITRANS).canonical()) for sx in bg_refs[1]]

    i = SanskritObject(f, encoding=ITRANS)