# 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
# 
# SLP1 = sanscript.SLP1


import codecs
import inspect
import json
import logging
import os
import re
import progressbar
from sanskrit_parser.base.sanskrit_base import SanskritObject, SLP1
from sanskrit_parser.lexical_analyzer.sanskrit_lexical_analyzer import SanskritLexicalAnalyzer
    s = re.sub('M$', 'm', s)
    return s


def process_line(lnum, line_in):
    '''Process a single line'''
    logging.info("Processing Line {}: {}".format(lnum, line_in))
    r = None
    subsplitp = False
    line = line_in.strip()
    if line and line[0] == '#':
        logging.info("Skipping Comment")
        return None
    if line.find('=>') == -1:
        logging.info("Cannot find =>")
        return None
    full, split = line.split('=>')
    full = full.strip()
    full = full.replace(u'|', '')
    # Zero width joiner/nonjoiner
    full = full.replace(u"\u200c", "")
    full = full.replace(u"\u200d", "")
    ofull = full  # Save
    full = _dumpchars(SanskritObject(full).transcoded(SLP1))
    split = split.strip()
    split = split.replace(u'|', '')
    # Zero width joiner/nonjoiner
    split = split.replace(u"\u200c", "")
    split = split.replace(u"\u200d", "")
    osplit = split  # Save

# 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
# 
# SLP1 = sanscript.SLP1


# Path: tests/obsolete/generate_uohd_LexicalAnalyzer_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, SLP1
from sanskrit_parser.lexical_analyzer.sanskrit_lexical_analyzer import SanskritLexicalAnalyzer

    s = re.sub('M$', 'm', s)
    return s


def process_line(lnum, line_in):
    '''Process a single line'''
    logging.info("Processing Line {}: {}".format(lnum, line_in))
    r = None
    subsplitp = False
    line = line_in.strip()
    if line and line[0] == '#':
        logging.info("Skipping Comment")
        return None
    if line.find('=>') == -1:
        logging.info("Cannot find =>")
        return None
    full, split = line.split('=>')
    full = full.strip()
    full = full.replace(u'|', '')
    # Zero width joiner/nonjoiner
    full = full.replace(u"\u200c", "")
    full = full.replace(u"\u200d", "")
    ofull = full  # Save
    full = _dumpchars(SanskritObject(full).transcoded(SLP1))
    split = split.strip()
    split = split.replace(u'|', '')
    # Zero width joiner/nonjoiner
    split = split.replace(u"\u200c", "")
    split = split.replace(u"\u200d", "")
    osplit = split  # Save

    splits = list(map(lambda x: _dumpchars(SanskritObject(x).transcoded(SLP1).strip()), split.split('+')))