GithubHelp home page GithubHelp logo

chinese_name_generator's Introduction

A good name is all you need

presentation : https://drive.google.com/file/d/1-9wwoZZPWz_EVhi28o-vo9GJOOkK69wL/view

example

  • way 1

      input:鍾 target:佳 
      input:佳 target:紋 
      input:紋 target:。 
    
  • way 2

      input:鍾 target:鍾佳
      input:鍾佳 target:鍾佳紋
      input:鍾佳紋 target:鍾佳紋。
    

model

class RNN(nn.Module):
    def __init__(self, input_size, hidden_size, output_size):
        super(RNN, self).__init__()
        self.input_size = input_size
        self.hidden_size = hidden_size
        self.output_size = output_size
        self.gru = nn.GRU(self.input_size, self.hidden_size,dropout = 0.5)
        self.h2o = nn.Linear(self.hidden_size, self.output_size)
        self.softmax = nn.LogSoftmax() 
    def forward(self, input):
        out,_ = self.gru(input)
        out = self.h2o(out).squeeze(0).squeeze(0)
        output = self.softmax(out)
        return output
    def initHidden(self):
        return torch.zeros(1, self.hidden_size)

char embedding

import pickle
f=  open ('./char_embedding.pkl', 'rb')
dict_char = pickle.load(f)
f.close()

data

crawler data from https://findbiz.nat.gov.tw/fts/query/QueryBar/queryInit.do;jsessionid=F906D81F3071A0B848AC0633D47165D7

chinese_name_generator's People

Contributors

1tangerine1day avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.