<commit_before>﻿using AdaSDK;
using AdaSDK.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AdaBot.Dialogs
{
    public class TreatmentDialog
    {
        public TreatmentDialog()
        {

        }

        public GenderValues getVisitsByGender(string valueGender)
        {
            if (valueGender == "femme" || valueGender == "femmes" || valueGender == "fille" || valueGender == "filles")
            {
                return GenderValues.Female;
            }

            else return GenderValues.Male;
        }

        public int getNbPerson(List<VisitDto> visitsReturn, int nbPerson)
        {
            List<int> listID = new List<int>();
            List<int> listIDVisit = new List<int>();
            foreach (var visit in visitsReturn)
            {
                if (!listID.Contains(visit.PersonVisit.PersonId) && !listIDVisit.Contains(visit.ID))
                {
                    listID.Add(visit.PersonVisit.PersonId);
                    listIDVisit.Add(visit.ID);<commit_msg>optimisation merge<commit_after>﻿using AdaSDK;
using AdaSDK.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AdaBot.Dialogs
{
    public class TreatmentDialog
    {
        public TreatmentDialog()
        {

        }

        public GenderValues getVisitsByGender(string valueGender)
        {
            if (valueGender == "femme" || valueGender == "femmes" || valueGender == "fille" || valueGender == "filles")
            {
                return GenderValues.Female;
            }

            else return GenderValues.Male;
        }

        public int getNbPerson(List<VisitDto> visitsReturn, int nbPerson)
        {
            List<int> listID = new List<int>();
            List<int> listIDVisit = new List<int>();
            foreach (var visit in visitsReturn)
            {
                if (!listID.Contains(visit.PersonVisit.PersonId) && !listIDVisit.Contains(visit.ID))
                {
                    listID.Add(visit.PersonVisit.PersonId); 
                    listIDVisit.Add(visit.ID);
{'fraction_non_alphanumeric': 0.10112359550561797, 'fraction_numerical': 0.0, 'mean_word_length': 1.9557399723374826, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2632258', 'n_tokens_mistral': 632, 'n_tokens_neox': 570, 'n_words': 122}