Skip to content

Commit b607b8e

Browse files
committed
Translate some comments to English
1 parent a0c9013 commit b607b8e

File tree

6 files changed

+13
-17
lines changed

6 files changed

+13
-17
lines changed

src/main/java/ldbc/snb/datagen/generator/ClusteringKnowsGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ private void createEdgesCommunityCore(ArrayList<Person> persons, Community c) {
463463
if (pI.index_ < other.index_) {
464464
float prob = rand.nextFloat();
465465
if (prob <= c.p_) {
466-
// crear aresta
466+
// create edge
467467
if (Knows.createKnow(rand, persons.get(pI.index_), persons.get(other.index_)))
468468
numCoreCoreEdges++;
469469
else

src/main/java/ldbc/snb/datagen/generator/DatagenParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Linked Data Benchmark Council (http://www.ldbcouncil.org)
4343

4444
public class DatagenParams {
4545

46-
//Files and folders
46+
// Files and folders
4747
public static final String DICTIONARY_DIRECTORY = "/dictionaries/";
4848
public static final String SPARKBENCH_DIRECTORY = "/sparkbench";
4949
public static final String IPZONE_DIRECTORY = "/ipaddrByCountries";

src/main/java/ldbc/snb/datagen/generator/ForumGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public Forum createGroup(RandomGeneratorFarm randomFarm, long forumId, Person pe
104104
language
105105
);
106106

107-
//Set tags of this forum
107+
// Set tags of this forum
108108
forum.tags(interest);
109109

110110

src/main/java/ldbc/snb/datagen/generator/PhotoGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public long createPhotos(RandomGeneratorFarm randomFarm, final Forum album, fina
8484
int popularPlaceId;
8585
PopularPlace popularPlace;
8686
if (randomFarm.get(RandomGeneratorFarm.Aspect.POPULAR).nextDouble() < DatagenParams.probPopularPlaces) {
87-
//Generate photo information from user's popular place
87+
// Generate photo information from user's popular place
8888
int popularIndex = randomFarm.get(RandomGeneratorFarm.Aspect.POPULAR).nextInt(popularPlaces.size());
8989
popularPlaceId = popularPlaces.get(popularIndex);
9090
popularPlace = Dictionaries.popularPlaces.getPopularPlace(album.place(), popularPlaceId);

src/main/java/ldbc/snb/datagen/generator/PostGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public long createPosts(RandomGeneratorFarm randomFarm, final Forum forum, final
103103

104104
String content = "";
105105

106-
// crear properties class para passar
106+
// crear properties class para passar _TRANSLATE
107107
content = this.generator_.generateText(member.person(), postInfo.tags, prop);
108108

109109
int country = member.person().countryId();
@@ -136,7 +136,7 @@ public long createPosts(RandomGeneratorFarm randomFarm, final Forum forum, final
136136
.get(RandomGeneratorFarm.Aspect.NUM_LIKE), forum, post_, Like.LikeType.POST, exporter);
137137
}
138138

139-
//// generate comments
139+
// generate comments
140140
int numComments = randomFarm.get(RandomGeneratorFarm.Aspect.NUM_COMMENT)
141141
.nextInt(DatagenParams.maxNumComments + 1);
142142
postId = commentGenerator_.createComments(randomFarm, forum, post_, numComments, postId, exporter);

src/main/java/ldbc/snb/datagen/generator/TweetGenerator.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,16 @@ public class TweetGenerator extends TextGenerator {
4949
private DistributionKey hashtag;
5050
private DistributionKey sentiment;
5151
private DistributionKey popularword;
52-
//distribution popular,negative, neutral tweets
53-
private DistributionKey lengthsentence; // sentece length and sentences per tweet
52+
// distribution of popular, negative, and neutral tweets
53+
private DistributionKey lengthsentence; // sentence length and sentences per tweet
5454
private DistributionKey lengthtweet;
5555

5656
public TweetGenerator(Random random, TagDictionary tagDic) throws NumberFormatException, IOException {
5757
super(random, tagDic);
58-
//input de fitxers i crea els 4 maps
58+
// load the input files and create 5 maps
5959
hashtag = new DistributionKey(DatagenParams.SPARKBENCH_DIRECTORY + "/hashtags.csv");
6060
sentiment = new DistributionKey(DatagenParams.SPARKBENCH_DIRECTORY + "/sentiment.csv");
6161
popularword = new DistributionKey(DatagenParams.SPARKBENCH_DIRECTORY + "/words.csv");
62-
//proportion = new DistributionKey(DatagenParams.SPARKBENCH_DIRECTORY + "/sentiment.csv");
6362
lengthsentence = new DistributionKey(DatagenParams.SPARKBENCH_DIRECTORY + "/sentence_lengths.csv");
6463
lengthtweet = new DistributionKey(DatagenParams.SPARKBENCH_DIRECTORY + "/sentence_count.csv");
6564
}
@@ -72,17 +71,17 @@ protected void load() {
7271
@Override
7372
public String generateText(PersonSummary member, TreeSet<Integer> tags, Properties prop) {
7473
StringBuffer content = null;
75-
//mirar num de frases
74+
// determine the number of sentence
7675
Double numsentences = Double.valueOf(lengthtweet.nextDouble(this.random));
7776
for (int i = 0; i < numsentences; ++i) {
7877
Double numwords = Double.valueOf(lengthsentence.nextDouble(this.random));
79-
// depenen de la distribució de number hashtags per sentence int numhashtags;
78+
// depenen de la distribució de number hashtags per sentence int numhashtags; _TRANSLATE
8079
//int numhashtags = funciondistribuciohashtags(numwords);
8180
int numhashtags = (int) (numwords * 0.4);
8281
for (int j = 0; j < numhashtags; ++j) {
8382
content.append(" " + hashtag.nextDouble(this.random));
8483
}
85-
// depenen de la distribució de number sentiment words per sentence int numhashtags;
84+
// depenen de la distribució de number sentiment words per sentence int numhashtags; _TRANSLATE
8685
//int numsentimentswords = funciondistribuciosentimentswords(numwords);
8786
int numsentimentswords = (int) (numwords * 0.4);
8887
for (int q = 0; q < numhashtags; ++q) {
@@ -94,12 +93,9 @@ public String generateText(PersonSummary member, TreeSet<Integer> tags, Properti
9493
}
9594

9695
}
97-
//per cada frase mirar numero de paraules
98-
//mirar numero de hashtags
96+
//per cada frase mirar numero de paraules mirar numero de hashtags _TRANSLATE
9997
content.toString();
10098
return content.toString();
101-
10299
}
103100

104-
105101
}

0 commit comments

Comments
 (0)