Exemple #1
0
                                authorName] = interestingauthors.get(
                                    authorName, 0) + 1
                            authorscores[(
                                authorName, areaname,
                                year)] = authorscores.get(
                                    (authorName, areaname, year), 0) + 1.0
                            authorscoresAdjusted[(
                                authorName, areaname,
                                year)] = authorscoresAdjusted.get(
                                    (authorName, areaname, year),
                                    0) + 1.0 / authorsOnPaper

    return (interestingauthors, authorscores, authorscoresAdjusted, authlogs)


fdict = csv2dict_str_str('faculty-affiliations.csv')

(intauthors_gl, authscores_gl, authscoresAdjusted_gl,
 authlog_gl) = parseDBLP(fdict)

f = open('generated-author-info.csv', 'w')
f.write('"name","dept","area","count","adjustedcount","year"\n')
for (authorName, area, year) in authscores_gl:
    count = authscores_gl[(authorName, area, year)]
    countAdjusted = authscoresAdjusted_gl[(authorName, area, year)]
    f.write(authorName.encode('utf-8'))
    f.write(',')
    f.write((fdict[authorName]).encode('utf-8'))
    f.write(',')
    f.write(area)
    f.write(',')
Exemple #2
0
                                )
                                + 1.0
                            )
                            authorscoresAdjusted[
                                (authorName, areaname, year)
                            ] = (
                                authorscoresAdjusted.get(
                                    (authorName, areaname, year), 0
                                )
                                + 1.0 / authorsOnPaper
                            )

    return (interestingauthors, authorscores, authorscoresAdjusted, authlogs)


fdict = csrankings.csv2dict_str_str("faculty-affiliations.csv")

(intauthors_gl, authscores_gl, authscoresAdjusted_gl, authlog_gl) = parseDBLP(
    fdict
)

f = open("all-author-info.csv", "w")
f.write('"name","dept","area","count","adjustedcount","year"\n')
for (authorName, area, year) in authscores_gl:
    count = authscores_gl[(authorName, area, year)]
    countAdjusted = authscoresAdjusted_gl[(authorName, area, year)]
    # f.write(authorName.encode('utf-8'))
    f.write(authorName)
    f.write(",")
    # f.write((fdict[authorName]).encode('utf-8'))
    f.write((fdict[authorName]))