docstr: Takes a string written in the 'Standard Galactic Alphabet'
  (aka Minecraft Enchanting Table Symbols) and translates it to ASCII text.
docstr_tok: ["Takes","a","string","written","in","the","'Standard","Galactic","Alphabet'","(","aka","Minecraft","Enchanting","Table","Symbols",")","and","translates","it","to","ASCII","text","."]
code: def decode(self, ctext: T) -> Optional[U]:
      """
      Takes a string written in the 'Standard Galactic Alphabet'
      (aka Minecraft Enchanting Table Symbols) and translates it to ASCII text.
      """
      logging.debug("Attempting Standard Galactic Alphabet decoder")
  
      # To avoid complications, only move forward with the decoding if we can
      # reasonably assume that the input string is written in the galactic alphabet
      galactic_matches = 0
      for symbol in self.GALACTIC_DICT.keys():
          # These symbols are assumed to be frequent enough in regular
          # text to be skipped when counting the matches. All others are counted.
          if symbol in ctext and symbol not in ["!", "|"]:
              galactic_matches += 1
          else:
              continue
      if galactic_matches == 0:
          logging.debug(
              "No matching galactic alphabet letters found. Skipping galactic decoder"
          )
          return None
      logging.debug(
          f"{galactic_matches} galactic alphabet letters found. "
      )
  
      result = ""
      # Take out the problematic characters consisting of multiple symbols
      ctext = (
          ctext.replace("||", "|")
          .replace("/", "")
          .replace("¡", "")
          .replace(" ̣ ", "")
          .replace("̇", "x")
      )
      logging.debug(f"Modified string is {ctext}")
  
      for letter in ctext:
          if letter in self.GALACTIC_DICT.keys():
              # Match every letter of the input to its galactic counterpoint
              result += self.GALACTIC_DICT[letter]
          else:
              # If the current character is not in the defined alphabet,
              # just accept it as-is (useful for numbers, punctuation, etc.)
              result += letter
      # Remove the trailing space (appearing as a leading space)
      # from the x that results from the diacritic replacement
      result = result.replace("x ", "x")
      logging.debug(f"Decoded string is {result}")
      return result
  
file_path: Ciphey/ciphey/basemods/Decoders/galactic.py
imports: from typing import Dict, Optional
  import logging
  from rich.logging import RichHandler
  from ciphey.iface import Config, Decoder, ParamSpec, T, Translation, U, registry
label_desc: Use image node_id 1 for calling the Galactic obj's underlying member method code with example usage: obj.decode(ctext) and returns: result, None