-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c27eb2
commit 2a78971
Showing
12 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"model":"gpt4", | ||
"data_constraints_can_be_checked": "no", | ||
"number_of_options_in_the_generators": "10", | ||
"cultural_alignment": "1", | ||
"cultural_alignment_quantitative": "0", | ||
"executes": "yes", | ||
"execute_error": "", | ||
"contains_true_generator":"yes", | ||
"comments":"None of the generated song titles are 100% accurate, but a few of the titles have similar wording to some real song titles." | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
To generate test data for random popular Sri Lankan songs in Sinhala letters, we first need to have a list of popular songs during 2000-2010. Since there's no built-in feature in the ruby-faker library to generate Sri Lankan songs, we need to customize it. Here's an example of how to do it: | ||
|
||
```ruby | ||
require 'faker' | ||
|
||
class SriLankanSongGenerator | ||
SONGS = [ | ||
"සුළඟ විලාසිත්තා", | ||
"සිහින යකා", | ||
"ඔබ නොදැන්නා මා නොදැන්නේ", | ||
"පුංචි නිදා පුංචි සිහිනයේ", | ||
"කවුරුත් දන්නේ නෑ සිහිනේ", | ||
"රා රා බෝම්බෝම්", | ||
"සඳ කුමරියෝ", | ||
"පුරුදු වූ නුඹේ", | ||
"මේ තරම් ප්රේමයි", | ||
"නිළ අහසේ" | ||
] | ||
|
||
def self.generate | ||
{ | ||
title: SONGS.sample, | ||
artist: Faker::Name.name, | ||
release_year: Faker::Number.between(from: 2000, to: 2010) | ||
} | ||
end | ||
end | ||
|
||
# Generate 10 random songs | ||
10.times do | ||
song = SriLankanSongGenerator.generate | ||
puts "Title: #{song[:title]}, Artist: #{song[:artist]}, Release Year: #{song[:release_year]}" | ||
end | ||
``` | ||
|
||
In this script, we define a list of popular Sri Lankan songs in Sinhala letters during 2000-2010. The `generate` method will randomly select a song from the list, generate a random name for the artist using the `Faker::Name.name` method, and generate a random release year between 2000 and 2010 using the `Faker::Number.between` method. Finally, we generate 10 random songs and print them out. | ||
|
||
Please note that the song titles are just examples and may not reflect actual popular Sri Lankan songs from the 2000-2010 period. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Write a test data generator in ruby using the ruby-faker library that generates random popular Sri Lankan songs in Sinhala letters during 2000-2010 time period. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"model":"gpt4", | ||
"data_constraints_can_be_checked": "no", | ||
"number_of_options_in_the_generators": "3", | ||
"cultural_alignment": "0", | ||
"cultural_alignment_quantitative": "0", | ||
"executes": "yes", | ||
"execute_error": "", | ||
"contains_true_generator":"yes", | ||
"comments":"It does not find any accurate personal name from the song" | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Unfortunately, the "ruby-faker" library does not support generating names in Sinhalese or any specific names mentioned in a song. However, you can create a custom method to generate these names randomly. Here's an example of how you can do this: | ||
|
||
```ruby | ||
require 'faker' | ||
|
||
def generate_sinhalese_name | ||
names = ["උතුරු කොනේ", "නුඹ හිනැහෙන්", "ගුණදාස කපුගේ"] # Add more names as needed | ||
names.sample | ||
end | ||
|
||
10.times do | ||
puts generate_sinhalese_name | ||
end | ||
``` | ||
|
||
In this code, we define a method `generate_sinhalese_name` that returns a random name from the `names` array. We then call this method 10 times to generate 10 random names. | ||
|
||
Please note that this code does not use the "ruby-faker" library, as it does not support this specific use case. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Write a test data generator in ruby using the ruby-faker library that randomly generates personal names mentioned in the song "උතුරු කොනේ නුඹ හිනැහෙන්" by Gunadasa Kapuge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"model":"gpt4", | ||
"data_constraints_can_be_checked": "n-a", | ||
"number_of_options_in_the_generators": "4", | ||
"cultural_alignment": "4", | ||
"cultural_alignment_quantitative": "1", | ||
"executes": "yes", | ||
"execute_error": "", | ||
"contains_true_generator":"yes", | ||
"comments":"Identifies all the names from the lyrics accurately (except for a small spelling mistake). But the words with the meanings 'brother' or 'sister' are also considered as names. Since in Sri Lankan culture, it is normal to use 'brother' or 'sister' along with the name, we can consider the results as accurate." | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
The lyrics mention four personal names: නඩරාජා මල්ලියේ, සුමනසිරි මල්ලියේ, සෙල්ලම්මා නංගියේ, සෙනෙහෙලතා නංයේ. | ||
|
||
Here is a simple Ruby script that uses the faker gem to generate test data with these names: | ||
|
||
```ruby | ||
require 'faker' | ||
|
||
def generate_test_data | ||
names = ["නඩරාජා මල්ලියේ", "සුමනසිරි මල්ලියේ", "සෙල්ලම්මා නංගියේ", "සෙනෙහෙලතා නංයේ"] | ||
|
||
10.times do | ||
name = names.sample | ||
email = Faker::Internet.email(name: name, separators: '.') | ||
phone = Faker::PhoneNumber.phone_number | ||
|
||
puts "Name: #{name}, Email: #{email}, Phone: #{phone}" | ||
end | ||
end | ||
|
||
generate_test_data | ||
``` | ||
|
||
This script generates 10 sets of test data, each with a name randomly chosen from the list of names mentioned in the song, and a fake email and phone number generated by the faker library. The email is generated with the selected name as the username, using a dot as the separator. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Write a test data generator in ruby using the ruby-faker library that randomly generates personal names mentioned in the song "උතුරු කොනේ නුඹ හිනැහෙන්" by Gunadasa Kapuge. | ||
|
||
Following are the lyrics for the first verse in the song. | ||
උතුරු කොනේ නුඹ හිනහේ නඩරාජා මල්ලියේ | ||
දකුණු කොනේ නුඹ හිනහේ සුමනසිරි මල්ලියේ | ||
උතුරු කොනේ නුඹ හිනහේ සෙල්ලම්මා නංගියේ | ||
දකුණු කොනේ නුඹ හිනහේ සෙනෙහෙලතා නංගියේ |