# Path: fedjax/datasets/scripts/sent140/data_to_sqlite.py
# FLAGS = flags.FLAGS
# def main(argv) -> None:
# def user_data_to_numpy(user_data: List[List[str]]) -> Dict[str, np.ndarray]:
# def normalize_tweet(tweet: str) -> str:


from absl.testing import absltest
from absl.testing import parameterized
from fedjax.datasets.scripts.sent140 import data_to_sqlite
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.Let's use the full copyright notice
"""Test for data_to_sqlite normalization."""



class DataToSQLiteTest(parameterized.TestCase):

  @parameterized.named_parameters(
      {
          'testcase_name': 'test url and username',
          'input_string': 'Thank @user1 https://en.wikipedia.org more story...',
          'desired': 'thank USERNAME URL more story',
      }, {
          'testcase_name': 'test numerics',
          'input_string': 'Pi 3.14, 10 months, 50,000.00 and 7-10.',
          'desired': 'pi NUMERIC NUMERIC months NUMERIC and NUMERIC',
      }, {
          'testcase_name': 'test hyphen',
          'input_string': 'This is a double--hyphen! And this is a single-one.',
          'desired': 'this is a double hyphen and this is a single-one',
      }, {
          'testcase_name': 'test punctuation',
          'input_string': 'I.do{not},know....that*',
          'desired': 'i do not know that',
      })
  def test_normalize_dialogue_string(self, input_string, desired):

# Path: fedjax/datasets/scripts/sent140/data_to_sqlite.py
# FLAGS = flags.FLAGS
# def main(argv) -> None:
# def user_data_to_numpy(user_data: List[List[str]]) -> Dict[str, np.ndarray]:
# def normalize_tweet(tweet: str) -> str:


# Path: fedjax/datasets/scripts/sent140/data_to_sqlite_test.py
from absl.testing import absltest
from absl.testing import parameterized
from fedjax.datasets.scripts.sent140 import data_to_sqlite

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.Let's use the full copyright notice
"""Test for data_to_sqlite normalization."""



class DataToSQLiteTest(parameterized.TestCase):

  @parameterized.named_parameters(
      {
          'testcase_name': 'test url and username',
          'input_string': 'Thank @user1 https://en.wikipedia.org more story...',
          'desired': 'thank USERNAME URL more story',
      }, {
          'testcase_name': 'test numerics',
          'input_string': 'Pi 3.14, 10 months, 50,000.00 and 7-10.',
          'desired': 'pi NUMERIC NUMERIC months NUMERIC and NUMERIC',
      }, {
          'testcase_name': 'test hyphen',
          'input_string': 'This is a double--hyphen! And this is a single-one.',
          'desired': 'this is a double hyphen and this is a single-one',
      }, {
          'testcase_name': 'test punctuation',
          'input_string': 'I.do{not},know....that*',
          'desired': 'i do not know that',
      })
  def test_normalize_dialogue_string(self, input_string, desired):

    self.assertEqual(desired, data_to_sqlite.normalize_tweet(input_string))