battle programmers alliance
Would you like to react to this message? Create an account in a few clicks or log in to continue.


battle programming a forum for elite programmers with extreme will power to sharpen their skills
 
HomeGallerySearchRegisterLog in
 

 translator skills 1st example

Go down 
AuthorMessage
Moti Barski
super
super
Moti Barski

Posts : 568
Join date : 2011-08-02

translator skills 1st example Empty
PostSubject: translator skills 1st example   translator skills 1st example EmptyThu Mar 25, 2021 5:29 am

Code:
public class DiGhettoTranslator extends DISkill {
    private DISkillUtils diSkillUtils = new DISkillUtils();
    private UwU uwu = new UwU();
    private Algorithm algorithm = null;
    private GhettoTranslator ghettoTranslator = new GhettoTranslator();
    private ABDLTranslator abdlTranslator = new ABDLTranslator();
    private int mode = 0;
    public DiGhettoTranslator(Kokoro kokoro) {
        super(kokoro);
    }

    @Override
    public void input(String ear, String skin, String eye) {
        if (ear.isEmpty()) {
            return;
        }
        if (ear.contains("shut up") || ear.contains("talk normal")) {
            mode = 0;
        }
        if (ear.contains("activate black")) {
            mode = 1;
        }
        if (ear.contains("activate pink")) {
            mode = 2;
        }
        if (ear.contains("activate blue")) {
            mode = 3;
        }
        // pink talk
        switch (mode) {
            case 1:
                algorithm = diSkillUtils.customizedVerbatimGorithm("translator",
                        new APSay(1, ghettoTranslator.translate(ear)));
                break;
            case 2:
                algorithm = diSkillUtils.customizedVerbatimGorithm("translator", new APSay(1, uwu.convertToUwU(ear)));
                break;
            case 3:
                algorithm = diSkillUtils.customizedVerbatimGorithm("translator",
                        new APSay(1, abdlTranslator.translatePlusUwU(ear)));
                break;
            default:
                algorithm = diSkillUtils.customizedVerbatimGorithm("translator", new APVerbatim(ear));
                break;
        }

    }

    @Override
    public void output(Neuron noiron) {
        if (algorithm != null) {
            noiron.algParts.add(algorithm);
            algorithm = null;
        }
    }
}

this skill is to be placed in a chobit placed last in the Brain class c'tor.
we have 3 fun modes her to translate the waifubots output :
ghetto talk, baby talk, and UwU

_________________
MB over and out emp it up
Back to top Go down
Moti Barski
super
super
Moti Barski

Posts : 568
Join date : 2011-08-02

translator skills 1st example Empty
PostSubject: Re: translator skills 1st example   translator skills 1st example EmptyThu Mar 25, 2021 5:30 am

init code snippet (from main activity)

chii = ChobitV2(Personality1(SharedPrefDB(this)))
chii!!.loadPersonality(Personality1(SharedPrefDB(this)))
tts = TextToSpeech(this, this)
cerabellumV2=CerabellumV2(this)//TODO
val translatorChobit:ChobitV2 = ChobitV2(PersonalityTranslator(SharedPrefDB(this)))
brain = Brain(cerabellumV2!!,chii!!,translatorChobit)

the translation chobit modifies the output of the upper chobits, thus acting as a translator or
output modifier inside the brain class which daisy chains chobits, preferably 2 or 3 chobits overall

_________________
MB over and out emp it up
Back to top Go down
 
translator skills 1st example
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
battle programmers alliance :: battle programming alliance :: the LivinGrimoire-
Jump to: